lkml.org 
[lkml]   [2014]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2014-05-18 01:21    [W:0.048 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site