linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex <alex_luca@163.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Zhang Kun <zhangkun@cdjrlc.com>
Subject: Re: [PATCH] pinctrl: renesas:fix possible null pointer dereference struct pinmux_range *
Date: Tue, 9 Feb 2021 22:26:06 +0800	[thread overview]
Message-ID: <b2642624-f7d9-3e50-1880-1115988343a8@163.com> (raw)
In-Reply-To: <CAMuHMdV445RaAydwgd=Sx6Y+jLJ-PpPSut8wi=Mj-qznYWi84g@mail.gmail.com>

On 2/9/21 10:12 PM, Geert Uytterhoeven wrote:
> Hi Alex,
> 
> Thanks for your patch!
> 
> On Sun, Feb 7, 2021 at 4:08 PM <alex_luca@163.com> wrote:
>> From: Zhang Kun <zhangkun@cdjrlc.com>
>>
>> The parameters of  sh_pfc_enum_in_range() pinmux_range *r should be checked
>> first for possible null ponter, especially when PINMUX_TYPE_FUNCTION as the
>> pinmux_type was passed by sh_pfc_config_mux().
> 
> If pinmux_type in sh_pfc_config_mux() is PINMUX_TYPE_FUNCTION or
> PINMUX_TYPE_GPIO, range is indeed NULL.
> But as the call
> 
>     in_range = sh_pfc_enum_in_range(enum_id, range);
> 
> is not done in case of these pinmux types, I don't see where the
> problem is.  What am I missing?
> 

Oh, you are right. I think I know what I missed.
Thank you.

Alex


      reply	other threads:[~2021-02-09 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 15:07 [PATCH] pinctrl: renesas:fix possible null pointer dereference struct pinmux_range * alex_luca
2021-02-09 14:12 ` Geert Uytterhoeven
2021-02-09 14:26   ` Alex [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=b2642624-f7d9-3e50-1880-1115988343a8@163.com \
    --to=alex_luca@163.com \
    --cc=geert@linux-m68k.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=zhangkun@cdjrlc.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).