On 08/01/2014 11:13 AM, Dan Carpenter wrote: > On Fri, Aug 01, 2014 at 11:01:36AM +0200, Marc Kleine-Budde wrote: > >>> diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c >>> index 5dede6e..109cb44 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) >> >> What about using PTR_ERR_OR_ZERO()? > > No. It doesn't ever return a PTR_ERR(). Checking for that would just > introduce a new static checker warning (signs of confusion may indicate > buggy code). Okay, thanks for the clarification. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature