From: Joe Perches <joe@perches.com>
To: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] char: misc: use pr_err instead of printk
Date: Sat, 11 Oct 2014 11:35:41 -0700 [thread overview]
Message-ID: <1413052541.22149.10.camel@joe-AO725> (raw)
In-Reply-To: <1413052311-2646-1-git-send-email-rahulbedarkar89@gmail.com>
On Sun, 2014-10-12 at 00:01 +0530, Rahul Bedarkar wrote:
[]
> diff --git a/drivers/char/misc.c b/drivers/char/misc.c
[]
> @@ -280,12 +280,12 @@ static int __init misc_init(void)
>
> err = -EIO;
> if (register_chrdev(MISC_MAJOR,"misc",&misc_fops))
> - goto fail_printk;
> + goto fail_pr_err;
> misc_class->devnode = misc_devnode;
> return 0;
>
> -fail_printk:
> - printk("unable to get major %d for misc devices\n", MISC_MAJOR);
> +fail_pr_err:
> + pr_err("unable to get major %d for misc devices\n", MISC_MAJOR);
> class_destroy(misc_class);
> fail_remove:
> remove_proc_entry("misc", NULL);
The printk is not relevant.
Maybe the label should be "fail_destroy:"
next prev parent reply other threads:[~2014-10-11 18:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-11 18:31 Rahul Bedarkar
2014-10-11 18:35 ` Joe Perches [this message]
2014-10-14 15:22 ` Rahul Bedarkar
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=1413052541.22149.10.camel@joe-AO725 \
--to=joe@perches.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rahulbedarkar89@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®