[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140517223555.GR3693@n2100.arm.linux.org.uk>
Date: Sat, 17 May 2014 23:35:55 +0100
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Emil Goode <emilgoode@...il.com>,
Shawn Guo <shawn.guo@...escale.com>,
Sascha Hauer <kernel@...gutronix.de>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v3] ARM: imx: fix error handling in ipu device
registration
On Sun, May 18, 2014 at 01:08:36AM +0300, Dan Carpenter wrote:
> Let's look at that error handling again.
>
> err: <-- the name is not descriptive. the location is bad.
> kfree(pdev->dev.dma_mask); <- null dereference.
> platform_device_put(pdev); <- ok
> return ERR_PTR(-ENODEV); <- should be "return ERR_PTR(ret);"
>
> 3 out of 4 of the lines are bad.
2 out of 4. kfree(NULL) is perfectly legal.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists