public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* -NODEV vs. -ENODEV
@ 2004-05-25 23:54 David Daney
  2004-05-26  5:12 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Daney @ 2004-05-25 23:54 UTC (permalink / raw)
  To: linux-kernel

While working on a driver that is not part of the  standard kernel 
sources, I found that dev_open() was returning -NODEV when there was no 
device (instead of -ENODEV).

Since NODEV is #defined to be 0 this caused open to erroneously report 
success.

It seems to me that any place you see -NODEV in the kernel sources is 
almost certainly an error.

Using the 2.4.25 sources from linux-mips.org I get the following:

$ grep -r -- -NODEV *
drivers/isdn/sc/command.c:      return -NODEV;
drivers/media/video/cpia.c:                     return -NODEV;
drivers/net/defxx.c:    int rc = -NODEV;

I have no idea if these still exist in the current sources,  but I 
suspect that they do.

David Daney



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: -NODEV vs. -ENODEV
  2004-05-25 23:54 -NODEV vs. -ENODEV David Daney
@ 2004-05-26  5:12 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-05-26  5:12 UTC (permalink / raw)
  To: David Daney; +Cc: linux-kernel


Thanks for the report, I'll fix up these 2.4.x cases.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-26  5:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-25 23:54 -NODEV vs. -ENODEV David Daney
2004-05-26  5:12 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox