diff mbox

[08/19] iwlegacy: Return directly if allocation fails in il_eeprom_init()

Message ID 01ae52425e9dba9f82f8d107da02a0d2cd23f09d.1458262312.git.julian.calaby@gmail.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Julian Calaby March 18, 2016, 2:23 a.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>

Also remove an unused label.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
[Rewrote commit message]
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
---
 drivers/net/wireless/intel/iwlegacy/common.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

SF Markus Elfring March 18, 2016, 1:41 p.m. UTC | #1
> Also remove an unused label.

Is such a commit message a bit too short?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Julian Calaby March 18, 2016, 2:33 p.m. UTC | #2
Hi Markus,

On Sat, Mar 19, 2016 at 12:41 AM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
>> Also remove an unused label.
>
> Is such a commit message a bit too short?

I don't think so, but I don't decide these sorts of things.

Does anyone else have an opinion on this?

Thanks,
Dan Carpenter March 18, 2016, 2:53 p.m. UTC | #3
On Sat, Mar 19, 2016 at 01:33:16AM +1100, Julian Calaby wrote:
> Hi Markus,
> 
> On Sat, Mar 19, 2016 at 12:41 AM, SF Markus Elfring
> <elfring@users.sourceforge.net> wrote:
> >> Also remove an unused label.
> >
> > Is such a commit message a bit too short?
> 
> I don't think so, but I don't decide these sorts of things.
> 
> Does anyone else have an opinion on this?

This is certainly not something where we need to redo the patch but
since you asked for the future.  A lot of web archives put the subject
and the body of the email far apart:

http://marc.info/?l=linux-wireless&m=145826783627087&w=2

lkml.org is the same way.

It makes these types of patch descriptions awkward.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Julian Calaby March 19, 2016, 1:16 p.m. UTC | #4
Hi Dan,

On Sat, Mar 19, 2016 at 1:53 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Sat, Mar 19, 2016 at 01:33:16AM +1100, Julian Calaby wrote:
>> Hi Markus,
>>
>> On Sat, Mar 19, 2016 at 12:41 AM, SF Markus Elfring
>> <elfring@users.sourceforge.net> wrote:
>> >> Also remove an unused label.
>> >
>> > Is such a commit message a bit too short?
>>
>> I don't think so, but I don't decide these sorts of things.
>>
>> Does anyone else have an opinion on this?
>
> This is certainly not something where we need to redo the patch but
> since you asked for the future.  A lot of web archives put the subject
> and the body of the email far apart:
>
> http://marc.info/?l=linux-wireless&m=145826783627087&w=2
>
> lkml.org is the same way.
>
> It makes these types of patch descriptions awkward.

Makes sense, I'll try to avoid descriptions like this in the future.

Thanks,
diff mbox

Patch

diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index eb5cb60..c3afaf7 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -723,10 +723,9 @@  il_eeprom_init(struct il_priv *il)
 	sz = il->cfg->eeprom_size;
 	D_EEPROM("NVM size = %d\n", sz);
 	il->eeprom = kzalloc(sz, GFP_KERNEL);
-	if (!il->eeprom) {
-		ret = -ENOMEM;
-		goto alloc_err;
-	}
+	if (!il->eeprom)
+		return -ENOMEM;
+
 	e = (__le16 *) il->eeprom;
 
 	il->ops->apm_init(il);
@@ -778,7 +777,6 @@  err:
 		il_eeprom_free(il);
 	/* Reset chip to save power until we load uCode during "up". */
 	il_apm_stop(il);
-alloc_err:
 	return ret;
 }
 EXPORT_SYMBOL(il_eeprom_init);