mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
nl802154: fix Oops in ieee802154_nl_get_dev
ieee802154_nl_get_dev() lacks check for the existance of the device that was returned by dev_get_XXX, thus resulting in Oops for non-existing devices. Fix it. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
This commit is contained in:
parent
e0af6062aa
commit
932c1329ac
1 changed files with 3 additions and 0 deletions
|
@ -276,6 +276,9 @@ static struct net_device *ieee802154_nl_get_dev(struct genl_info *info)
|
|||
else
|
||||
return NULL;
|
||||
|
||||
if (!dev)
|
||||
return NULL;
|
||||
|
||||
if (dev->type != ARPHRD_IEEE802154) {
|
||||
dev_put(dev);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue