mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ARM: zx: Fix error handling
'devm_ioremap_resource()' returns an error pointer in case of error, not NULL. So test it with IS_ERR. Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
This commit is contained in:
parent
ce34096152
commit
9cfc93b2f8
1 changed files with 1 additions and 1 deletions
|
|
@ -169,7 +169,7 @@ static int zx296702_pd_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
pcubase = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (!pcubase) {
|
||||
if (IS_ERR(pcubase)) {
|
||||
dev_err(&pdev->dev, "ioremap fail.\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue