diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2014-11-06 17:49:45 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-11 09:13:36 -0200 |
commit | b31eb901c4e5eeef4c83c43dfbc7fe0d4348cb21 (patch) | |
tree | 289cd2133da9aa4d168e76f5ae0637b8174eedb7 /drivers/media/i2c | |
parent | 167921cb0ff2bdbf25138dad799fec88c99ed316 (diff) | |
download | op-kernel-dev-b31eb901c4e5eeef4c83c43dfbc7fe0d4348cb21.zip op-kernel-dev-b31eb901c4e5eeef4c83c43dfbc7fe0d4348cb21.tar.gz |
[media] smiapp: Only some selection targets are settable
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>
Cc: stable@vger.kernel.org # for v3.10 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-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 932ed9b..b10aaed 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2190,7 +2190,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); |