lkml.org 
[lkml]   [2013]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 03/22] mfd: omap-usb-tll: Use devm_kzalloc/ioremap and clean up error path
On 01/17/2013 11:12 AM, Roger Quadros wrote:
> On 01/16/2013 09:37 PM, Sergei Shtylyov wrote:
>> Hello.
>>
>> On 01/16/2013 05:43 PM, Roger Quadros wrote:
>>
>>> Use devm_ variants of kzalloc() and ioremap(). Simplify the error path.
>>
>>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>>> ---
>>> drivers/mfd/omap-usb-tll.c | 36 +++++++++++-------------------------
>>> 1 files changed, 11 insertions(+), 25 deletions(-)
>>
>>> diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
>>> index 9658e18..53ed10b 100644
>>> --- a/drivers/mfd/omap-usb-tll.c
>>> +++ b/drivers/mfd/omap-usb-tll.c
>> [...]
>>> - base = ioremap(res->start, resource_size(res));
>>> + base = devm_request_and_ioremap(dev, res);
>>> if (!base) {
>>> - dev_err(dev, "TLL ioremap failed\n");
>>> ret = -ENOMEM;
>>
>> -EADDRNOTAVAIL as the comment to devm_request_and_ioremap() suggests.
>>
>
> I changed it deliberately to ENOMEM, as I could not find EADDRNOTAVAIL
> defined in all architectures.
>
> ENOMEM shouldn't harm.
>

Correcting myself,

It is defined here

include/uapi/asm-generic/errno.h:#define EADDRNOTAVAIL 99
/* Cannot assign requested address */

So i'll update both patches.

--
cheers,
-roger



\
 
 \ /
  Last update: 2013-01-17 12:21    [W:0.043 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site