]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-mac: fix the remove path for non-MAC interfaces
authorIoana Ciornei <ioana.ciornei@nxp.com>
Mon, 11 Jan 2021 17:18:02 +0000 (19:18 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 14 Jan 2021 03:21:51 +0000 (19:21 -0800)
commit0258e96f88fbd62c96a3cc3e919028b3a02c8c2d
tree6e64b4f5b6c422064dacaf60527ff69616f86fb3
parent19d16939841f67332bdc73ee4004c066b5ca7974
dpaa2-mac: fix the remove path for non-MAC interfaces

Check if the interface is indeed connected to a MAC before trying to
close the DPMAC object representing it. Without this check we end up
working with a NULL pointer.

Fixes: a112eb6935cd ("dpaa2-mac: export MAC counters even when in TYPE_FIXED")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20210111171802.1826324-1-ciorneiioana@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c