diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2014-11-06 17:49:45 -0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-01-07 16:20:13 +0100 |
commit | fd120bec1cfd1e12f996081c367a6600832fa811 (patch) | |
tree | 463fc3139b57a48d0ad717a1595345c361beea4f /drivers/media | |
parent | aa4e539e52e4a364cc599b69240c473fd6e9f445 (diff) |
media: smiapp: Only some selection targets are settable
commit b31eb901c4e5eeef4c83c43dfbc7fe0d4348cb21 upstream.
Setting a non-settable selection target caused BUG() to be called. The check
for valid selections only takes the selection target into account, but does
not tell whether it may be set, or only get. Fix the issue by simply
returning an error to the user.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index ae66d91bf713..371ca22843ee 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2139,7 +2139,7 @@ static int smiapp_set_selection(struct v4l2_subdev *subdev, ret = smiapp_set_compose(subdev, fh, sel); break; default: - BUG(); + ret = -EINVAL; } mutex_unlock(&sensor->mutex); |