Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1244446
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put |
| Date | 2015-10-12 09:40 +0200 |
| Message-ID | <qiFSa-Bb-21@gated-at.bofh.it> (permalink) |
| References | <qi1L3-18e-9@gated-at.bofh.it> <qi1L3-18e-13@gated-at.bofh.it> <qiFyN-em-3@gated-at.bofh.it> <qiFIt-pP-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Oct 12, 2015 at 9:29 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> On Mon, 12 Oct 2015 09:18:52 +0200, Geert Uytterhoeven wrote:
>
>> > pd = kzalloc(sizeof(*pd), GFP_KERNEL);
>> > - if (!pd)
>> > + if (!pd) {
>> > + of_node_put(np);
>> > return -ENOMEM;
>> > + }
>>
>> While technically this patch is correct, the system will be dead anyway if it
>> ever goes OOM at core_initcall() time.
>
> Then BUG_ON(!pd); ?
kzalloc() will scream anyway.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put Julia Lawall <Julia.Lawall@lip6.fr> - 2015-10-10 14:50 +0200
Re: [PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put Simon Horman <horms@verge.net.au> - 2015-10-12 02:20 +0200
Re: [PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put Geert Uytterhoeven <geert@linux-m68k.org> - 2015-10-12 09:20 +0200
Re: [PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2015-10-12 09:30 +0200
Re: [PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put Geert Uytterhoeven <geert@linux-m68k.org> - 2015-10-12 09:40 +0200
Re: [PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put Geert Uytterhoeven <geert@linux-m68k.org> - 2015-10-12 09:30 +0200
Re: [PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put Julia Lawall <julia.lawall@lip6.fr> - 2015-10-12 09:30 +0200
csiph-web