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ä <[email protected]>
Signed-off-by: James Hogan <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
unlock:
mutex_unlock(&dev->lock);
- return count;
+ return (ret < 0) ? ret : count;
}
static void rc_dev_release(struct device *device)