Linux I2C development
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-i2c@vger.kernel.org, peda@axentia.se,
	yorksun@freescale.com, alexander.sverdlin@nokia.com
Subject: Re: [PATCH RESEND] i2c: mux: reg: check return value after calling platform_get_resource()
Date: Wed, 7 Dec 2022 21:21:54 +0100	[thread overview]
Message-ID: <Y5D14g9Ggaz9keBX@shikoro> (raw)
In-Reply-To: <20221029093825.3425857-1-yangyingliang@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

On Sat, Oct 29, 2022 at 05:38:25PM +0800, Yang Yingliang wrote:
> It will cause null-ptr-deref in resource_size(), if platform_get_resource()
> returns NULL, move calling resource_size() after devm_ioremap_resource() that
> will check 'res' to avoid null-ptr-deref.
> And use devm_platform_get_and_ioremap_resource() to simplify code.
> 
> Fixes: b3fdd32799d8 ("i2c: mux: Add register-based mux i2c-mux-reg")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Applied to for-next, thanks!

Peter, as other people are sending similar patches, I applied this one
now right away. Hope you don't mind.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2022-12-07 20:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29  9:38 [PATCH RESEND] i2c: mux: reg: check return value after calling platform_get_resource() Yang Yingliang
2022-12-07 20:21 ` Wolfram Sang [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=Y5D14g9Ggaz9keBX@shikoro \
    --to=wsa@kernel.org \
    --cc=alexander.sverdlin@nokia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=yangyingliang@huawei.com \
    --cc=yorksun@freescale.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