dpaa2-mac: fix unused label warning
authorIoana Ciornei <ciorneiioana@gmail.com>
Wed, 28 Apr 2021 13:22:03 +0000 (16:22 +0300)
committerXiaobo Xie <xiaobo.xie@nxp.com>
Fri, 30 Apr 2021 15:00:52 +0000 (17:00 +0200)
When the CONFIG_FSL_DPAA2_MAC_NETDEVS Kconfig is not enabled, the
free_netdev label is not used, thus a warning is generated.
Fix this by moving the label under the #ifdef Kconfig.

Fixes: 64e7f931c2ae ("dpaa2-mac: probe standalone DPMAC objects")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c

index 65418be..4ed42f2 100644 (file)
@@ -846,8 +846,8 @@ free_portal:
 unregister_netdev:
 #ifdef CONFIG_FSL_DPAA2_MAC_NETDEVS
        unregister_netdev(net_dev);
-#endif
 free_netdev:
+#endif
        free_netdev(net_dev);
 
        return err;