]> git.baikalelectronics.ru Git - kernel.git/commit
net: macb: fix an issue about leak related system resources
authorDejin Zheng <zhengdejin5@gmail.com>
Sun, 3 May 2020 12:32:26 +0000 (20:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 May 2020 23:01:48 +0000 (16:01 -0700)
commit7def3da6c6328f9a8decd1cba844020b9327f810
treefd39090c49ad27404963905bf0c81f1ef9229219
parent5c5e99a6752e010d5aacbb6fd1318861a12aae3a
net: macb: fix an issue about leak related system resources

A call of the function macb_init() can fail in the function
fu540_c000_init. The related system resources were not released
then. use devm_platform_ioremap_resource() to replace ioremap()
to fix it.

Fixes: 8889bf335e795b8 ("macb: Add support for SiFive FU540-C000")
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Yash Shah <yash.shah@sifive.com>
Suggested-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c