net: mvneta: Fix err code path of probe
authorJisheng Zhang <Jisheng.Zhang@synaptics.com>
Mon, 27 May 2019 11:04:17 +0000 (11:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 May 2019 18:05:00 +0000 (11:05 -0700)
commitd484e06e25ebb937d841dac02ac1fe76ec7d4ddd
tree4c684a155f5c1355f40841940386cb5450896989
parent54ed6fd2e03fd38819afa60a5b4cb61874230d34
net: mvneta: Fix err code path of probe

Fix below issues in err code path of probe:
1. we don't need to unregister_netdev() because the netdev isn't
registered.
2. when register_netdev() fails, we also need to destroy bm pool for
HWBM case.

Fixes: dc35a10f68d3 ("net: mvneta: bm: add support for hardware buffer management")
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c