From: Alexey Klimov <klimov.linux@gmail.com>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: linux-media@vger.kernel.org
Subject: [patch review] gspca - mr97310a: return error instead of -1 in sd_mod_init
Date: Fri, 27 Mar 2009 19:08:22 +0300 [thread overview]
Message-ID: <1238170102.3791.8.camel@tux.localhost> (raw)
Hello, Jean-Francois
What do you think about such small cleanup ?
---
Patch reformats sd_mod_init in the way to make it return error code from
usb_register instead of -1.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
--
diff -r 56cf0f1772f7 linux/drivers/media/video/gspca/mr97310a.c
--- a/linux/drivers/media/video/gspca/mr97310a.c Mon Mar 23 19:18:34 2009 -0300
+++ b/linux/drivers/media/video/gspca/mr97310a.c Fri Mar 27 01:42:28 2009 +0300
@@ -347,8 +347,10 @@
/* -- module insert / remove -- */
static int __init sd_mod_init(void)
{
- if (usb_register(&sd_driver) < 0)
- return -1;
+ int ret;
+ ret = usb_register(&sd_driver);
+ if (ret < 0)
+ return ret;
PDEBUG(D_PROBE, "registered");
return 0;
}
--
Best regards, Klimov Alexey
next reply other threads:[~2009-03-27 16:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 16:08 Alexey Klimov [this message]
2009-03-27 19:01 ` [patch review] gspca - mr97310a: return error instead of -1 in sd_mod_init Jean-Francois Moine
2009-03-28 20:08 ` A question about Documentation/video4linux/gspca.txt Theodore Kilgore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1238170102.3791.8.camel@tux.localhost \
--to=klimov.linux@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=moinejf@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.