mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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: b7f698b22b ("pinctrl: realtek: Switch to use devm functions")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
parent
fc334ad4a1
commit
9ba4ef6847
|
|
@ -574,8 +574,9 @@ int rtd_pinctrl_probe(struct platform_device *pdev, const struct rtd_pinctrl_des
|
|||
return -ENOMEM;
|
||||
|
||||
data->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (!data->base)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(data->base))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(data->base),
|
||||
"Failed to ioremap resource\n");
|
||||
|
||||
data->dev = &pdev->dev;
|
||||
data->info = desc;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user