Re: [PATCH] firmware/dmi_scan: Drop OOM messages

From: Jean Delvare
Date: Wed Jul 10 2013 - 12:17:55 EST


Hi Joe,

Le Wednesday 10 July 2013 Ã 07:51 -0700, Joe Perches a Ãcrit :
> even more trivial...
>
> On Wed, 2013-07-10 at 14:47 +0200, Jean Delvare wrote:
> > +++ linux-3.11-rc0/drivers/firmware/dmi_scan.c 2013-07-10 14:11:56.544792703 +0200
> > @@ -62,8 +62,6 @@ static const char * __init dmi_string(co
> > str = dmi_alloc(len);
> > if (str != NULL)
> []
> > @@ -219,10 +217,8 @@ static void __init dmi_save_one_device(i
> > dev = dmi_alloc(sizeof(*dev) + strlen(name) + 1);
> > + if (!dev)
> > return;
> []
> > @@ -258,10 +254,8 @@ static void __init dmi_save_oem_strings_
> > dev = dmi_alloc(sizeof(*dev));
> > + if (!dev)
> > break;
> []
> > @@ -277,18 +271,14 @@ static void __init dmi_save_ipmi_device(
> > data = dmi_alloc(dm->length);
> > + if (data == NULL)
> > return;
> []
> > dev = dmi_alloc(sizeof(*dev));
> > + if (!dev)
> > return;
> []
> > @@ -303,10 +293,9 @@ static void __init dmi_save_dev_onboard(
> > onboard_dev = dmi_alloc(sizeof(*onboard_dev) + strlen(name) + 1);
> > + if (!onboard_dev)
> > return;
>
> It'd also be nice to use the same test style
> in all 6 uses.
>
> if (!foo)

Both styles are used throughout the file, and checkpatch doesn't
complain. Unifying the coding style is beyond the scope of my patchset,
sorry. Feel free to send a patch on top of mine if you really care.

--
Jean Delvare
Suse L3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/