]> git.baikalelectronics.ru Git - kernel.git/commit
usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Fri, 17 Nov 2017 20:02:09 +0000 (14:02 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Nov 2017 03:23:57 +0000 (12:23 +0900)
commite4f7dd7e343522172ba5950539a0bc234ca79113
tree965c9f92f32d6d69c92e60e1289f0274cbc1085b
parentb4924ded115bb12e245e129ebbf21d84ee8f3742
usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set

_dev_ is being dereferenced before it is null checked, hence there
is a potential null pointer dereference.

Fix this by moving the pointer dereference after _dev_ has been null
checked.

Addresses-Coverity-ID: 1462020
Fixes: 07358bde2582 ("usbnet: ipheth: prevent TX queue timeouts when device not ready")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/ipheth.c