Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pinctrl: realtek: Fix error check for devm_platform_ioremap_resource()

Replace NULL check with IS_ERR() for devm_platform_ioremap_resource()
return value. Use dev_err_probe() for error handling to maintain
consistency with the rest of the probe function.

Fixes: b7f698b22b8b ("pinctrl: realtek: Switch to use devm functions")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Linus Walleij <linusw@kernel.org>

authored by

Chen Ni and committed by
Linus Walleij
9ba4ef68 fc334ad4

+3 -2
+3 -2
drivers/pinctrl/realtek/pinctrl-rtd.c
··· 574 574 return -ENOMEM; 575 575 576 576 data->base = devm_platform_ioremap_resource(pdev, 0); 577 - if (!data->base) 578 - return -ENOMEM; 577 + if (IS_ERR(data->base)) 578 + return dev_err_probe(&pdev->dev, PTR_ERR(data->base), 579 + "Failed to ioremap resource\n"); 579 580 580 581 data->dev = &pdev->dev; 581 582 data->info = desc;