lkml.org 
[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] pinctrl: renesas:fix possible null pointer dereference struct pinmux_range *
From
Date
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

\
 
 \ /
  Last update: 2021-02-09 16:16    [W:0.071 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site