Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1574554

Re: [PATCH] clk: sunxi-ng: Check kzalloc() for errors and cleanup error path

From Maxime Ripard <maxime.ripard@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH] clk: sunxi-ng: Check kzalloc() for errors and cleanup error path
Date 2017-02-06 12:00 +0100
Message-ID <t7PbA-3SX-5@gated-at.bofh.it> (permalink)
References <t6V9o-8rI-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, Feb 03, 2017 at 03:00:50PM -0800, Stephen Boyd wrote:
> This kzalloc() could fail. Let's bail out with -ENOMEM here
> instead of NULL dereferencing. That silences static checkers. We
> should also cleanup on the error path even though this function
> returning an error probably means the system won't boot.
> 
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Can you apply it directly?

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] clk: sunxi-ng: Check kzalloc() for errors and cleanup error path Stephen Boyd <sboyd@codeaurora.org> - 2017-02-04 00:10 +0100
  Re: [PATCH] clk: sunxi-ng: Check kzalloc() for errors and cleanup  error path Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-02-06 12:00 +0100
    Re: [PATCH] clk: sunxi-ng: Check kzalloc() for errors and cleanup  error path Stephen Boyd <sboyd@codeaurora.org> - 2017-02-06 23:50 +0100

csiph-web