提交 7b802ce7 编写于 作者: J James Hogan 提交者: Mauro Carvalho Chehab

[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: NAntti Seppälä <a.seppala@gmail.com>
Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 f61e2268
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册