net: ieee802154: fix null deref in parse dev addr
authorDan Robertson <dan@dlrobertson.com>
Fri, 23 Apr 2021 04:02:13 +0000 (00:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 08:00:03 +0000 (10:00 +0200)
commitc7836de2cadd88bc2f20f2c5a3d4ef4c73aef627
tree606384429ee3b393918bd61e0ce5e8fd079ed8e7
parentf2b1fc360fa1283b61359f232c6965f4170260f0
net: ieee802154: fix null deref in parse dev addr

[ Upstream commit 9fdd04918a452980631ecc499317881c1d120b70 ]

Fix a logic error that could result in a null deref if the user sets
the mode incorrectly for the given addr type.

Signed-off-by: Dan Robertson <dan@dlrobertson.com>
Acked-by: Alexander Aring <aahringo@redhat.com>
Link: https://lore.kernel.org/r/20210423040214.15438-2-dan@dlrobertson.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ieee802154/nl802154.c