From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-mmc@vger.kernel.org, kernel-janitors@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Paolo Abeni <pabeni@redhat.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Yang Yingliang <yangyingliang@huawei.com>,
LKML <linux-kernel@vger.kernel.org>,
cocci@inria.fr
Subject: Re: [PATCH] mmc: mmc_spi: Adjust error handling in mmc_spi_probe()
Date: Wed, 27 Dec 2023 18:56:45 +0200 [thread overview]
Message-ID: <ZYxXTVpLfI-mgxF4@smile.fi.intel.com> (raw)
In-Reply-To: <2aa6bd31-f3d8-41ac-abf1-9ec7cf7e064b@web.de>
On Wed, Dec 27, 2023 at 12:50:50PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Dec 2023 12:23:20 +0100
>
> The kfree() function was called in one case by
> the mmc_spi_probe() function during error handling
> even if the passed variable contained a null pointer.
> This issue was detected by using the Coccinelle software.
> * Thus return directly after a call of the function “kmalloc” failed
> at the beginning.
>
> * Move an error code assignment into an if branch.
How is this one better?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-12-27 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-27 11:50 [PATCH] mmc: mmc_spi: Adjust error handling in mmc_spi_probe() Markus Elfring
2023-12-27 16:56 ` Andy Shevchenko [this message]
2023-12-27 17:28 ` Markus Elfring
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=ZYxXTVpLfI-mgxF4@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=Markus.Elfring@web.de \
--cc=cocci@inria.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ulf.hansson@linaro.org \
--cc=yangyingliang@huawei.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