From: Mauro Carvalho Chehab Date: Sun, 4 Sep 2016 12:56:33 +0000 (-0300) Subject: cx231xx: don't return error on success X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9865f08984e14a1cc9f40ecfd468d59c92e1f3ce;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git cx231xx: don't return error on success 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 Signed-off-by: Willy Tarreau --- diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c index 235ba657d52e..79a24efc03d6 100644 --- a/drivers/media/usb/cx231xx/cx231xx-avcore.c +++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c @@ -1261,7 +1261,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)