lkml.org 
[lkml]   [2003]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bogus Warning in ppp_generic.c
On Fri, May 09, 2003 at 10:24:01AM +0200, Norbert Wolff wrote:
> printk(KERN_INFO "PPP generic driver version " PPP_VERSION "\n");
> err = register_chrdev(PPP_MAJOR, "ppp", &ppp_device_fops);
> +
> +#ifdef CONFIG_DEVFS_FS
> if (!err) {
> err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0),
> S_IFCHR|S_IRUSR|S_IWUSR, "ppp");
> }
> +#endif
>
> if (!err)
> printk(KERN_ERR "failed to register PPP device (%d)\n", err);

Wrong fix :) the error check is just reveresed, devfs_mk_cdev also returns
0 if CONFIG_DEVFS_FS is set and it succeded.

Btw, almost any occurance of #ifdef CONFIG_DEVFS_FS is a bug.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.019 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site