]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cx231xx: don't return error on success
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sun, 4 Sep 2016 12:56:33 +0000 (09:56 -0300)
committerJiri Slaby <jslaby@suse.cz>
Fri, 28 Oct 2016 18:36:58 +0000 (20:36 +0200)
commit 1871d718a9db649b70f0929d2778dc01bc49b286 upstream.

The cx231xx_set_agc_analog_digital_mux_select() callers
expect it to return 0 or an error. Returning a positive value
makes the first attempt to switch between analog/digital to fail.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/media/usb/cx231xx/cx231xx-avcore.c

index 89de00bf4f8201f2b187892c42ff7ade070f531c..bd45858cc9278297a51dbbdbcfb53517165f06d1 100644 (file)
@@ -1260,7 +1260,10 @@ int cx231xx_set_agc_analog_digital_mux_select(struct cx231xx *dev,
                                   dev->board.agc_analog_digital_select_gpio,
                                   analog_or_digital);
 
-       return status;
+       if (status < 0)
+               return status;
+
+       return 0;
 }
 
 int cx231xx_enable_i2c_port_3(struct cx231xx *dev, bool is_port_3)