Skip to content
Commit 8d7ea7f0 authored by Dejin Zheng's avatar Dejin Zheng Committed by Greg Kroah-Hartman
Browse files

net: macb: fix an issue about leak related system resources

[ Upstream commit b959c77d ]

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: c218ad55

 ("macb: Add support for SiFive FU540-C000")
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: default avatarYash Shah <yash.shah@sifive.com>
Suggested-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Suggested-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarDejin Zheng <zhengdejin5@gmail.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 18ad8a2f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment