From f69e9529ed96ff917096d0b7b3015c8d8ea5750d Mon Sep 17 00:00:00 2001 From: Alexey Klimov Date: Thu, 1 Jan 2009 13:02:07 -0300 Subject: [PATCH] V4L/DVB (10335): gspca - all subdrivers: Fix CodingStyle in sd_mod_init function. Introduce int ret and check it value after call to usb_register(). Signed-off-by: Alexey Klimov Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/conex.c | 4 +++- drivers/media/video/gspca/etoms.c | 4 +++- drivers/media/video/gspca/finepix.c | 4 +++- drivers/media/video/gspca/m5602/m5602_core.c | 4 +++- drivers/media/video/gspca/mars.c | 4 +++- drivers/media/video/gspca/ov519.c | 4 +++- drivers/media/video/gspca/ov534.c | 4 +++- drivers/media/video/gspca/pac207.c | 4 +++- drivers/media/video/gspca/pac7311.c | 4 +++- drivers/media/video/gspca/sonixb.c | 4 +++- drivers/media/video/gspca/sonixj.c | 4 +++- drivers/media/video/gspca/spca500.c | 4 +++- drivers/media/video/gspca/spca501.c | 4 +++- drivers/media/video/gspca/spca505.c | 4 +++- drivers/media/video/gspca/spca506.c | 4 +++- drivers/media/video/gspca/spca508.c | 4 +++- drivers/media/video/gspca/spca561.c | 4 +++- drivers/media/video/gspca/stk014.c | 4 +++- drivers/media/video/gspca/stv06xx/stv06xx.c | 4 +++- drivers/media/video/gspca/sunplus.c | 4 +++- drivers/media/video/gspca/t613.c | 4 +++- drivers/media/video/gspca/tv8532.c | 4 +++- drivers/media/video/gspca/vc032x.c | 4 +++- drivers/media/video/gspca/zc3xx.c | 4 +++- 24 files changed, 72 insertions(+), 24 deletions(-) diff --git a/drivers/media/video/gspca/conex.c b/drivers/media/video/gspca/conex.c index a7088f60bcd0..825342be41fc 100644 --- a/drivers/media/video/gspca/conex.c +++ b/drivers/media/video/gspca/conex.c @@ -1028,7 +1028,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/etoms.c b/drivers/media/video/gspca/etoms.c index ca888ac969d0..c5f8dda42435 100644 --- a/drivers/media/video/gspca/etoms.c +++ b/drivers/media/video/gspca/etoms.c @@ -927,7 +927,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/finepix.c b/drivers/media/video/gspca/finepix.c index 76c6e03cb6c9..96a5ca775b55 100644 --- a/drivers/media/video/gspca/finepix.c +++ b/drivers/media/video/gspca/finepix.c @@ -454,7 +454,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/m5602/m5602_core.c b/drivers/media/video/gspca/m5602/m5602_core.c index 37a47db2903d..e78914d7a1a0 100644 --- a/drivers/media/video/gspca/m5602/m5602_core.c +++ b/drivers/media/video/gspca/m5602/m5602_core.c @@ -373,7 +373,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init mod_m5602_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c index ba79afbf8b39..420224afacb1 100644 --- a/drivers/media/video/gspca/mars.c +++ b/drivers/media/video/gspca/mars.c @@ -420,7 +420,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index ac9b4dc064d6..c78d2d0f43d3 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c @@ -2176,7 +2176,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c index 01314e9995f0..e20ec7df34a7 100644 --- a/drivers/media/video/gspca/ov534.c +++ b/drivers/media/video/gspca/ov534.c @@ -584,7 +584,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index 546820f52c02..10331728f162 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c @@ -564,7 +564,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index f34bbc5db501..8a4551ecd0a6 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c @@ -1096,7 +1096,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c index 5ec361c779be..dd9417eea16a 100644 --- a/drivers/media/video/gspca/sonixb.c +++ b/drivers/media/video/gspca/sonixb.c @@ -1271,7 +1271,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 5c159d89bd82..d1b604c07afd 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c @@ -1793,7 +1793,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; info("registered"); return 0; diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/video/gspca/spca500.c index 94ed469a3ada..75494016515d 100644 --- a/drivers/media/video/gspca/spca500.c +++ b/drivers/media/video/gspca/spca500.c @@ -1092,7 +1092,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index 766da90e6eb7..9ae62f18f725 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c @@ -2210,7 +2210,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/spca505.c b/drivers/media/video/gspca/spca505.c index 90d555361ae7..32ae57e5f7be 100644 --- a/drivers/media/video/gspca/spca505.c +++ b/drivers/media/video/gspca/spca505.c @@ -862,7 +862,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/spca506.c b/drivers/media/video/gspca/spca506.c index 99fa3fc1cb62..aa3ecc8acfa6 100644 --- a/drivers/media/video/gspca/spca506.c +++ b/drivers/media/video/gspca/spca506.c @@ -771,7 +771,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c index f5c045967379..c9d5e6c80912 100644 --- a/drivers/media/video/gspca/spca508.c +++ b/drivers/media/video/gspca/spca508.c @@ -1665,7 +1665,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index d64e7d64d053..1538350849f9 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c @@ -1196,7 +1196,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/stk014.c b/drivers/media/video/gspca/stk014.c index cd1fbff0c94c..8743c03ed4aa 100644 --- a/drivers/media/video/gspca/stk014.c +++ b/drivers/media/video/gspca/stk014.c @@ -560,7 +560,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; info("registered"); return 0; diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index c60b163335c5..c43534db74bb 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c @@ -500,7 +500,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c index 1f07476a9905..a7d324cf1a5c 100644 --- a/drivers/media/video/gspca/sunplus.c +++ b/drivers/media/video/gspca/sunplus.c @@ -1464,7 +1464,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/video/gspca/t613.c index 74ca17845223..1dfdbf58526f 100644 --- a/drivers/media/video/gspca/t613.c +++ b/drivers/media/video/gspca/t613.c @@ -1171,7 +1171,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/tv8532.c b/drivers/media/video/gspca/tv8532.c index 1da292ea1c77..0bcbdb22e018 100644 --- a/drivers/media/video/gspca/tv8532.c +++ b/drivers/media/video/gspca/tv8532.c @@ -569,7 +569,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index ab5a25cfc69e..0f475ec2ab93 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c @@ -2459,7 +2459,9 @@ static struct usb_driver sd_driver = { /* -- module insert / remove -- */ static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0; diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index c32477db3bab..afc10a9ac539 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c @@ -7599,7 +7599,9 @@ static struct usb_driver sd_driver = { static int __init sd_mod_init(void) { - if (usb_register(&sd_driver) < 0) + int ret; + ret = usb_register(&sd_driver); + if (ret < 0) return -1; PDEBUG(D_PROBE, "registered"); return 0;