lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <202211111443005202576@zte.com.cn> Date: Fri, 11 Nov 2022 14:43:00 +0800 (CST) From: <ye.xingchen@....com.cn> To: <wg@...ndegger.com> Cc: <mkl@...gutronix.de>, <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>, <linux-can@...r.kernel.org>, <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <chi.minghao@....com.cn> Subject: [PATCH] can: c_can: use devm_platform_get_and_ioremap_resource() From: Minghao Chi <chi.minghao@....com.cn> Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Reported-by: Zeal Robot <zealci@....com.cn> Signed-off-by: Minghao Chi <chi.minghao@....com.cn> --- drivers/net/can/c_can/c_can_platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index 86e95e9d6533..03ccb7cfacaf 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -290,8 +290,7 @@ static int c_can_plat_probe(struct platform_device *pdev) goto exit; } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - addr = devm_ioremap_resource(&pdev->dev, mem); + addr = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(addr)) { ret = PTR_ERR(addr); goto exit; -- 2.25.1
Powered by blists - more mailing lists