usbnet: smsc95xx: dereferencing NULL pointer
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Tue, 11 Nov 2014 08:40:47 +0000 (14:10 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Nov 2014 21:24:08 +0000 (16:24 -0500)
commit8bca81d9875c7768c40a19fb439eebaf6cec898d
treef0e709326fc9292781a2000fde5f8ae88102d94c
parentd65c4e4e0aeb699e984bd4b382efffab418aa359
usbnet: smsc95xx: dereferencing NULL pointer

we were dereferencing dev to initialize pdata. but just after that we
have a BUG_ON(!dev). so we were basically dereferencing the pointer
first and then tesing it for NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/smsc95xx.c