summaryrefslogtreecommitdiff
path: root/drivers/net/can
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-08-01 12:53:44 +0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2014-08-21 12:49:59 +0400
commit37b75a3aa8ec7031df75219fe2f8e5e9b7be398f (patch)
treec52157f42c34cf3b271b9cd10a48e6d2422b4153 /drivers/net/can
parent9e37bc6c635a85e0ae3067f19d6f84e1c4516a6c (diff)
downloadlinux-37b75a3aa8ec7031df75219fe2f8e5e9b7be398f.tar.xz
can: c_can: checking IS_ERR() instead of NULL
devm_ioremap() returns NULL on error, not an ERR_PTR(). Fixes: 33cf75656923 ('can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource()') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: linux-stable <stable@vger.kernel.org> # >= v3.11 Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/c_can/c_can_platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index 5dede6e64376..109cb44291f5 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -280,7 +280,7 @@ static int c_can_plat_probe(struct platform_device *pdev)
priv->raminit_ctrlreg = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
- if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
+ if (!priv->raminit_ctrlreg || priv->instance < 0)
dev_info(&pdev->dev, "control memory is not used for raminit\n");
else
priv->raminit = c_can_hw_raminit_ti;