Commit:     f6c4286590e7cb13dd16cb2a6e4dc4a27ce6df1d
Parent:     6f686d3d14621b90f3793b705bdf9fa624fd29ca
Author:     Jeff Garzik <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 00:01:09 2007 -0400
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 16:17:59 2007 -0400

    [netdrvr] natsemi: Fix device removal bug
    This episode illustrates how an overused warning can train people to
    ignore that warning, which winds up hiding bugs.
    The warning
    drivers/net/natsemi.c: In function ‘natsemi_remove1’:
    drivers/net/natsemi.c:3222: warning: ignoring return value of
    ‘device_create_file’, declared with attribute warn_unused_result
    is oft-ignored, even though at close inspection one notices this occurs
    in the /remove/ function, not normally where creation occurs.  A quick
    s/create/remove/ and we are fixed, with the warning gone.
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/net/natsemi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 3450051..6bb48ba 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -671,7 +671,7 @@ static ssize_t natsemi_show_##_name(struct device *dev, \
 #define NATSEMI_CREATE_FILE(_dev, _name) \
          device_create_file(&_dev->dev, &dev_attr_##_name)
 #define NATSEMI_REMOVE_FILE(_dev, _name) \
-         device_create_file(&_dev->dev, &dev_attr_##_name)
+         device_remove_file(&_dev->dev, &dev_attr_##_name)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to