public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Akshay Adiga <akshay.adiga@linux•vnet.ibm.com>
To: Yangtao Li <tiny.windzz@gmail•com>
Cc: linux-pm@vger•kernel.org, viresh.kumar@linaro•org,
	rjw@rjwysocki•net, linux-kernel@vger•kernel.org,
	paulus@samba•org, linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates()
Date: Mon, 18 Feb 2019 00:41:49 +0530	[thread overview]
Message-ID: <20190217190155.GA25556@aks.ibm> (raw)
In-Reply-To: <20190216170623.12634-1-tiny.windzz@gmail.com>

On Sat, Feb 16, 2019 at 12:06:23PM -0500, Yangtao Li wrote:
> kmalloc() could fail, so insert a check of its return value. And
> if it fails, returns -ENOMEM.
> 
> And remove (struct pstate_idx_revmap_data *) to fix coccinelle WARNING
> by the way.
> 
> WARNING: casting value returned by memory allocation function to (struct
> pstate_idx_revmap_data *) is useless.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail•com>
> ---
>  drivers/cpufreq/powernv-cpufreq.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
Looks good to me. Thanks for fixing this.


  reply	other threads:[~2019-02-17 19:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-16 17:06 [PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates() Yangtao Li
2019-02-17 19:11 ` Akshay Adiga [this message]
2019-02-18  4:59 ` Viresh Kumar

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=20190217190155.GA25556@aks.ibm \
    --to=akshay.adiga@linux$(echo .)vnet.ibm.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-pm@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=paulus@samba$(echo .)org \
    --cc=rjw@rjwysocki$(echo .)net \
    --cc=tiny.windzz@gmail$(echo .)com \
    --cc=viresh.kumar@linaro$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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