media: smiapp: Only some selection targets are settable
authorSakari Ailus <sakari.ailus@iki.fi>
Thu, 6 Nov 2014 20:49:45 +0000 (17:49 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Dec 2014 17:37:08 +0000 (09:37 -0800)
commit6d6a8c0b7e25f934d19da71d14084aa851e76ec6
tree77a3210eea26ae73cb5f7909dbc9ddfbf522ae84
parentce7c82e8f8616f03120f8bed8e4f344b69fa6a47
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>
drivers/media/i2c/smiapp/smiapp-core.c