[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4937D4F6.6040506@trash.net>
Date: Thu, 04 Dec 2008 14:02:46 +0100
From: Patrick McHardy <kaber@...sh.net>
To: Inaky Perez-Gonzalez <inaky@...ux.intel.com>
CC: netdev@...r.kernel.org, wimax@...uxwimax.org
Subject: Re: [PATCH 07/39] wimax: generic WiMAX device management (registration,
deregistration, etc)
Inaky Perez-Gonzalez wrote:
> On Thursday 27 November 2008, Patrick McHardy wrote:
>>>
>>> + result = nla_put_u64(reply_skb, WIMAX_GNL_RESULT_CODE, (u64) code_s64);
>>> + if (result < 0)
>>> + dev_err(dev, "Error putting attribute: %d\n", result);
>> This is not how netlink protocols should treat errors.
>> It should return -ENOSPC (everywhere else also of course).
>
> Other than the fact that this function is gone after Johannes comments
> (so for everywhere else), wouldn't returning the -EMSGSIZE nla_put_*()
> returns enough?
>
> I changed all of them to be something like:
>
> result = nla_put*();
> if (result < 0)
> goto error path /* release skb/msg, return result */
That looks fine.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists