.. | .. |
---|
132 | 132 | mac = of_get_mac_address(bgmac->dev->of_node); |
---|
133 | 133 | |
---|
134 | 134 | /* If no MAC address assigned via device tree, check SPROM */ |
---|
135 | | - if (!mac) { |
---|
| 135 | + if (IS_ERR_OR_NULL(mac)) { |
---|
136 | 136 | switch (core->core_unit) { |
---|
137 | 137 | case 0: |
---|
138 | 138 | mac = sprom->et0mac; |
---|
.. | .. |
---|
217 | 217 | /* BCM 471X/535X family */ |
---|
218 | 218 | case BCMA_CHIP_ID_BCM4716: |
---|
219 | 219 | bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST; |
---|
220 | | - /* fallthrough */ |
---|
| 220 | + fallthrough; |
---|
221 | 221 | case BCMA_CHIP_ID_BCM47162: |
---|
222 | 222 | bgmac->feature_flags |= BGMAC_FEAT_FLW_CTRL2; |
---|
223 | 223 | bgmac->feature_flags |= BGMAC_FEAT_SET_RXQ_CLK; |
---|
.. | .. |
---|
323 | 323 | bcma_mdio_mii_unregister(bgmac->mii_bus); |
---|
324 | 324 | bgmac_enet_remove(bgmac); |
---|
325 | 325 | bcma_set_drvdata(core, NULL); |
---|
326 | | - kfree(bgmac); |
---|
327 | 326 | } |
---|
328 | 327 | |
---|
329 | 328 | static struct bcma_driver bgmac_bcma_driver = { |
---|