Assign ctio to se_cmd
handle resource leaks
get_device_id() returns dev_t which is an unsigned type and we check for return value < 0 for errors