[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1373467888.14604.32.camel@joe-AO722>
Date: Wed, 10 Jul 2013 07:51:28 -0700
From: Joe Perches <joe@...ches.com>
To: Jean Delvare <jdelvare@...e.de>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Ben Hutchings <ben@...adent.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] firmware/dmi_scan: Drop OOM messages
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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists