lkml.org 
[lkml]   [2012]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers/media/video/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get
Quoting Lars-Peter Clausen <lars@metafoo.de>:

> On 08/06/2012 04:26 PM, Dan Carpenter wrote:
>> On Mon, Aug 06, 2012 at 05:23:23PM +0300, Dan Carpenter wrote:
>>> On Sat, Aug 04, 2012 at 08:23:27PM +0200, Julia Lawall wrote:
>>>> @@ -922,12 +920,7 @@ static int emmaprp_probe(struct
>>>> platform_device *pdev)
>>>>
>>>> platform_set_drvdata(pdev, pcdev);
>>>>
>>>> - if (devm_request_mem_region(&pdev->dev, res_emma->start,
>>>> - resource_size(res_emma), MEM2MEM_NAME) == NULL)
>>>> - goto rel_vdev;
>>>> -
>>>> - pcdev->base_emma = devm_ioremap(&pdev->dev, res_emma->start,
>>>> - resource_size(res_emma));
>>>> + pcdev->base_emma = devm_request_and_ioremap(&pdev->dev, res_emma);
>>>> if (!pcdev->base_emma)
>>>> goto rel_vdev;
>>>
>>> This was in the original code, but there is a "ret = -ENOMEM;"
>>> missing here, and again a couple lines down in the original code.
>>>
>>
>> Or should that be -EIO instead of -ENOMEM? I'm not sure.
>
> -ENXIO is usually used in such a case.

Thanks for the feedback. I won't be able to access my work machine
until the end of the week, so I will fix it then.

julia





\
 
 \ /
  Last update: 2012-08-06 22:41    [W:0.090 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site