diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2014-11-06 17:49:45 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-12-16 09:09:42 -0800 |
commit | df3300033604498941be3519b2c403977c148674 (patch) | |
tree | 5ed4fb17601d997b2bb39a26db6efcc2d8b6f323 /drivers | |
parent | ca372d75eb86d01367ca8e5f6f684eb30a8b8195 (diff) | |
download | lwn-df3300033604498941be3519b2c403977c148674.tar.gz lwn-df3300033604498941be3519b2c403977c148674.zip |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-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 cae4f4683851..b280216de31b 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); |