public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	Chen-Yu Tsai <wens@csie.org>
Subject: Re: [PATCH] clk: sunxi-ng: Check kzalloc() for errors and cleanup error path
Date: Mon, 6 Feb 2017 11:51:20 +0100	[thread overview]
Message-ID: <20170206105120.5gxti6szfmxi4psc@lukather> (raw)
In-Reply-To: <20170203230050.26181-1-sboyd@codeaurora.org>

[-- Attachment #1: Type: text/plain, Size: 686 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2017-02-06 10:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 23:00 [PATCH] clk: sunxi-ng: Check kzalloc() for errors and cleanup error path Stephen Boyd
2017-02-06 10:51 ` Maxime Ripard [this message]
2017-02-06 22:48   ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170206105120.5gxti6szfmxi4psc@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox