summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorchiminghao <chi.minghao@zte.com.cn>2021-12-09 04:50:09 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-12-14 18:19:04 +0300
commit5d6db4aa3c85e5dd76a7c48073472c70e68b8d13 (patch)
tree5530206aef42475298fd5b77e28980024672ce66 /drivers/media
parentdf78b858e773967112b4444400fb7bb5bd7a9d8a (diff)
downloadlinux-5d6db4aa3c85e5dd76a7c48073472c70e68b8d13.tar.xz
media: drivers:usb:remove unneeded variable
return value form directly instead of taking this in another redundant variable. Link: https://lore.kernel.org/linux-media/20211209015009.409428-1-chi.minghao@zte.com.cn Reported-by: Zeal Robot <zealci@zte.com.cm> Signed-off-by: chiminghao <chi.minghao@zte.com.cn> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/gspca/m5602/m5602_s5k83a.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
index 4504d615b1e4..8ef010a87445 100644
--- a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
+++ b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c
@@ -407,25 +407,21 @@ static int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val)
static int s5k83a_set_brightness(struct gspca_dev *gspca_dev, __s32 val)
{
- int err;
u8 data[1];
struct sd *sd = (struct sd *) gspca_dev;
data[0] = val;
- err = m5602_write_sensor(sd, S5K83A_BRIGHTNESS, data, 1);
- return err;
+ return m5602_write_sensor(sd, S5K83A_BRIGHTNESS, data, 1);
}
static int s5k83a_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
{
- int err;
u8 data[2];
struct sd *sd = (struct sd *) gspca_dev;
data[0] = 0;
data[1] = val;
- err = m5602_write_sensor(sd, S5K83A_EXPOSURE, data, 2);
- return err;
+ return m5602_write_sensor(sd, S5K83A_EXPOSURE, data, 2);
}
static int s5k83a_set_flip_real(struct gspca_dev *gspca_dev,