summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/rc-main.c
diff options
context:
space:
mode:
authorJames Hogan2014-02-10 22:31:56 +0100
committerMauro Carvalho Chehab2014-03-11 16:13:23 +0100
commit7b802ce7e8c67510389fdbbe29edd87a75df3a93 (patch)
treef6395010073c5232f5dfa22f47f5bd812ed8d79f /drivers/media/rc/rc-main.c
parent[media] Siano: smsusb - Add a device id for PX-S1UD (diff)
downloadkernel-qcow2-linux-7b802ce7e8c67510389fdbbe29edd87a75df3a93.tar.gz
kernel-qcow2-linux-7b802ce7e8c67510389fdbbe29edd87a75df3a93.tar.xz
kernel-qcow2-linux-7b802ce7e8c67510389fdbbe29edd87a75df3a93.zip
[media] rc-main: store_filter: pass errors to userland
Propagate errors returned by drivers from the s_filter callback back to userland when updating scancode filters. This allows userland to see when the filter couldn't be updated, usually because it's not a valid filter for the hardware. Previously the filter was being updated conditionally on success of s_filter, but the write always reported success back to userland. Reported-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/rc/rc-main.c')
-rw-r--r--drivers/media/rc/rc-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 2ec60f8d2777..64481289c98e 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1090,7 +1090,7 @@ static ssize_t store_filter(struct device *device,
unlock:
mutex_unlock(&dev->lock);
- return count;
+ return (ret < 0) ? ret : count;
}
static void rc_dev_release(struct device *device)