(resending previously submitted patch from 16/7-2007 22:40)
Hi,
In drivers/net/tulip/uli526x.c::uli526x_interrupt() there's a test of the function argument 'void *dev_id' against NULL. But that test is pretty pointless, since if ever 'dev_id' is NULL we'll already have crashed inside "netdev_priv(dev)".
I don't think dev_id can ever actually be NULL, so the whole block inside "if (!dev) {" could probably just go away. But I guess there's a good reason someone put that ULI526X_DBUG() in there - and
if 'dev_id' /can/ actually be NULL then it's nice to have and in that case this patch actually fixes a possible crash (hence the version number update). So I guess that in this case we should just move the "db = netdev_priv(dev)" assignment past that NULL test. That's what this patch does.
Found by the Coverity checker.
Compile tested.
PS. Please keep me on Cc when replying.
Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx>