]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.8.5/cx231xx-don-t-return-error-on-success.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.8.5 / cx231xx-don-t-return-error-on-success.patch
1 From 1871d718a9db649b70f0929d2778dc01bc49b286 Mon Sep 17 00:00:00 2001
2 From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
3 Date: Sun, 4 Sep 2016 09:56:33 -0300
4 Subject: [media] cx231xx: don't return error on success
5
6 From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
7
8 commit 1871d718a9db649b70f0929d2778dc01bc49b286 upstream.
9
10 The cx231xx_set_agc_analog_digital_mux_select() callers
11 expect it to return 0 or an error. Returning a positive value
12 makes the first attempt to switch between analog/digital to fail.
13
14 Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16
17 ---
18 drivers/media/usb/cx231xx/cx231xx-avcore.c | 5 ++++-
19 1 file changed, 4 insertions(+), 1 deletion(-)
20
21 --- a/drivers/media/usb/cx231xx/cx231xx-avcore.c
22 +++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c
23 @@ -1264,7 +1264,10 @@ int cx231xx_set_agc_analog_digital_mux_s
24 dev->board.agc_analog_digital_select_gpio,
25 analog_or_digital);
26
27 - return status;
28 + if (status < 0)
29 + return status;
30 +
31 + return 0;
32 }
33
34 int cx231xx_enable_i2c_port_3(struct cx231xx *dev, bool is_port_3)