lkml.org 
[lkml]   [2014]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] char: misc: use pr_err instead of printk
From
Date
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:"



\
 
 \ /
  Last update: 2014-10-11 21:01    [W:0.066 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site