Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4088094 authored by Andi Shyti's avatar Andi Shyti Committed by Mauro Carvalho Chehab
Browse files

[media] lirc_dev: fix error return value



If ioctl is called, it cannot be a case of invalid system call
number (ENOSYS), that is a ENOTTY case which means that the
device doesn't support that specific ioctl command.

So, replace ENOSYS with ENOTTY.

Signed-off-by: default avatarAndi Shyti <andi.shyti@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 9675ee5a
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -585,7 +585,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		break;
		break;
	case LIRC_GET_REC_MODE:
	case LIRC_GET_REC_MODE:
		if (!(ir->d.features & LIRC_CAN_REC_MASK)) {
		if (!(ir->d.features & LIRC_CAN_REC_MASK)) {
			result = -ENOSYS;
			result = -ENOTTY;
			break;
			break;
		}
		}


@@ -595,7 +595,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
		break;
		break;
	case LIRC_SET_REC_MODE:
	case LIRC_SET_REC_MODE:
		if (!(ir->d.features & LIRC_CAN_REC_MASK)) {
		if (!(ir->d.features & LIRC_CAN_REC_MASK)) {
			result = -ENOSYS;
			result = -ENOTTY;
			break;
			break;
		}
		}


@@ -613,7 +613,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
	case LIRC_GET_MIN_TIMEOUT:
	case LIRC_GET_MIN_TIMEOUT:
		if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) ||
		if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) ||
		    ir->d.min_timeout == 0) {
		    ir->d.min_timeout == 0) {
			result = -ENOSYS;
			result = -ENOTTY;
			break;
			break;
		}
		}


@@ -622,7 +622,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
	case LIRC_GET_MAX_TIMEOUT:
	case LIRC_GET_MAX_TIMEOUT:
		if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) ||
		if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) ||
		    ir->d.max_timeout == 0) {
		    ir->d.max_timeout == 0) {
			result = -ENOSYS;
			result = -ENOTTY;
			break;
			break;
		}
		}