瀏覽代碼

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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Olof Johansson <olof@lixom.net>
Christophe JAILLET 8 年之前
父節點
當前提交
9cfc93b2f8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/arm/mach-zx/zx296702-pm-domain.c

+ 1 - 1
arch/arm/mach-zx/zx296702-pm-domain.c

@@ -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;
 	}