From: Krzysztof Kozlowski <krzk@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Peter Rosin <peda@axentia.se>, Andrew Davis <afd@ti.com>,
Thorsten Blum <thorsten.blum@linux.dev>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Thomas Richard <thomas.richard@bootlin.com>
Subject: Re: [PATCH next] mux: mmio: Fix IS_ERR() vs NULL check in probe()
Date: Sat, 29 Nov 2025 16:02:34 +0100 [thread overview]
Message-ID: <5a4d8f52-f03d-4498-a488-813b0d0b2d24@kernel.org> (raw)
In-Reply-To: <aSsIP7oKrhKfCUv3@stanley.mountain>
On 29/11/2025 15:50, Dan Carpenter wrote:
> The devm_kmalloc() function never returns error pointers, it returns
> NULL on error. Fix the error checking.
>
> Fixes: 4863cb2b0f50 ("mux: mmio: Add suspend and resume support")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/mux/mmio.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mux/mmio.c b/drivers/mux/mmio.c
> index e4ddb1e61923..3409af1ffb80 100644
> --- a/drivers/mux/mmio.c
> +++ b/drivers/mux/mmio.c
> @@ -101,13 +101,13 @@ static int mux_mmio_probe(struct platform_device *pdev)
> mux_mmio = mux_chip_priv(mux_chip);
>
> mux_mmio->fields = devm_kmalloc(dev, num_fields * sizeof(*mux_mmio->fields), GFP_KERNEL);
> - if (IS_ERR(mux_mmio->fields))
> - return PTR_ERR(mux_mmio->fields);
> + if (!mux_mmio->fields)
> + return -ENOMEM;
>
I wonder from where Thomas copied this code...
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
@Greg, that's a fix for something in your tree.
Best regards,
Krzysztof
prev parent reply other threads:[~2025-11-29 15:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-29 14:50 Dan Carpenter
2025-11-29 15:02 ` Krzysztof Kozlowski [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=5a4d8f52-f03d-4498-a488-813b0d0b2d24@kernel.org \
--to=krzk@kernel.org \
--cc=afd@ti.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=thomas.richard@bootlin.com \
--cc=thorsten.blum@linux.dev \
/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
all inboxes | Powered by JetHome®