mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
gpio: pxa: Fix return value of pxa_gpio_probe()
[ Upstream commit558ab2e815
] When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes:542c25b7a2
("drivers: gpio: pxa: use devm_platform_ioremap_resource()") Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a971f71e91
commit
d6d07089de
1 changed files with 2 additions and 2 deletions
|
@ -663,8 +663,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)
|
|||
pchip->irq1 = irq1;
|
||||
|
||||
gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (!gpio_reg_base)
|
||||
return -EINVAL;
|
||||
if (IS_ERR(gpio_reg_base))
|
||||
return PTR_ERR(gpio_reg_base);
|
||||
|
||||
clk = clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(clk)) {
|
||||
|
|
Loading…
Reference in a new issue