public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: linux-kernel@vger.kernel.org
Subject: -NODEV vs. -ENODEV
Date: Tue, 25 May 2004 16:54:52 -0700	[thread overview]
Message-ID: <40B3DCCC.5040401@avtrex.com> (raw)

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



             reply	other threads:[~2004-05-25 23:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-25 23:54 David Daney [this message]
2004-05-26  5:12 ` -NODEV vs. -ENODEV David S. Miller

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=40B3DCCC.5040401@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=linux-kernel@vger.kernel.org \
    /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