]> git.karo-electronics.de Git - karo-tx-linux.git/commit
netdrvr: natsemi: Fix device removal bug
authorJeff Garzik <jeff@garzik.org>
Tue, 17 Jul 2007 04:01:09 +0000 (00:01 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 2 Nov 2007 15:44:12 +0000 (08:44 -0700)
commitc9a06c0099d53aab5853a52076a756c967c121a5
treedd6af8ed78c44714fdfa96e5633492b76cd9ed14
parentd9e0dded68a8de6a831dd9c31be32a45f4b67373
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 <jeff@garzik.org>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/natsemi.c