linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: Yangtao Li <tiny.windzz@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] PM / devfreq: fix mem leak and missing check of return value in devfreq_add_device()
Date: Mon, 21 Jan 2019 10:22:08 +0900	[thread overview]
Message-ID: <20190121012208epcms1p4a7d1132bcfb6cc86db294ae5c606aa8b@epcms1p4> (raw)
In-Reply-To: <20190119050256.22520-1-tiny.windzz@gmail.com>

> 'devfreq' is malloced in devfreq_add_device() and should be freed in
> the error handling cases, otherwise it will cause memory leak.
> 
> devm_kzalloc() could fail, so insert a check of its return value. And
> if it fails, returns -ENOMEM.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

Dear Yangtao,

Could you please make your patch without indentation style changes?


The label, "err_devfreq", would fit more if it's renamed "err_kzalloc".


Cheers,
MyungJoo.

      parent reply	other threads:[~2019-01-21  7:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-19  5:02 [PATCH] PM / devfreq: fix mem leak and missing check of return value in devfreq_add_device() Yangtao Li
2019-01-19 12:27 ` Chanwoo Choi
2019-01-19 16:08   ` Frank Lee
     [not found] ` <CGME20190119050400epcas4p34ea32277236e72d4527176fd0e98bd72@epcms1p4>
2019-01-21  1:22   ` MyungJoo Ham [this message]

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=20190121012208epcms1p4a7d1132bcfb6cc86db294ae5c606aa8b@epcms1p4 \
    --to=myungjoo.ham@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=tiny.windzz@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).