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


Groups > linux.kernel > #1575216

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

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH] clk: sunxi-ng: Check kzalloc() for errors and cleanup error path
Date 2017-02-06 23:50 +0100
Message-ID <t80gG-2FR-9@gated-at.bofh.it> (permalink)
References <t6V9o-8rI-15@gated-at.bofh.it> <t7PbA-3SX-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/06, Maxime Ripard wrote:
> 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?
> 

Yep. Thanks.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Back to linux.kernel | Previous | NextPrevious 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