Skip to contentSkip to conversation

gspca - stv06xx: remove needless if check and goto

PATCH In review Alexey Klimov 2 participants 2 messages Jun 9, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gspca - stv06xx: remove needless if check and goto

Hello, Jean-Francois and Erik André

What do you think about such small change?
Looks like the code doesn't need if-check and goto here in stv06xx_stopN function. The code after label "out" does this.

--
Patch removes needless if check and goto.

--

linux/drivers/media/video/gspca/stv06xx/stv06xx.c +0 -2
diff -r ed3781a79c73 linux/drivers/media/video/gspca/stv06xx/stv06xx.c
@@ -293,8 +293,6 @@
 		goto out;
 
 	err = sd->sensor->stop(sd);
-	if (err < 0)
-		goto out;
 
 out:
 	if (err < 0)
Signature · 1 line
Best regards, Klimov Alexey
Reviewed-by on v1 1/1
#1 lore raw

2009/6/9 Alexey Klimov <[email protected]>:

Quoted 11 lines

Hello, Jean-Francois and Erik André

What do you think about such small change?
Looks like the code doesn't need if-check and goto here in stv06xx_stopN function. The code after label "out" does this.

--
Patch removes needless if check and goto.

Looks sane.
Thank you for reporting.

Best regards,
Erik

Quoted 19 lines

--
diff -r ed3781a79c73 linux/drivers/media/video/gspca/stv06xx/stv06xx.c

linux/drivers/media/video/gspca/stv06xx/stv06xx.c Tue Jun 09 14:49:04 2009 +0400 renamed from linux/drivers/media/video/gspca/stv06xx/stv06xx.c Sat Jun 06 16:31:34 2009 +0400 +0 -2
@@ -293,8 +293,6 @@
                goto out;
 
        err = sd->sensor->stop(sd);
-       if (err < 0)
-               goto out;
 

 out:
       if (err < 0)

--
Best regards, Klimov Alexey