public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Qiheng Lin <linqiheng@huawei.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read()
Date: Wed, 4 Jan 2023 16:12:43 +0000	[thread overview]
Message-ID: <Y7Wle+KbwoVTgnAr@google.com> (raw)
In-Reply-To: <20221208061555.8776-1-linqiheng@huawei.com>

On Thu, 08 Dec 2022, Qiheng Lin wrote:

> `req` is allocated in pcf50633_adc_async_read(), but
> adc_enqueue_request() could fail to insert the `req` into queue.
> We need to check the return value and free it in the case of failure.
> 
> Fixes: 08c3e06a5eb2 ("mfd: PCF50633 adc driver")
> Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
> ---
>  drivers/mfd/pcf50633-adc.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Applied, thanks

-- 
Lee Jones [李琼斯]

      reply	other threads:[~2023-01-04 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08  6:15 [PATCH] mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read() Qiheng Lin
2023-01-04 16:12 ` Lee Jones [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=Y7Wle+KbwoVTgnAr@google.com \
    --to=lee@kernel.org \
    --cc=linqiheng@huawei.com \
    --cc=linux-kernel@vger.kernel.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