Re: [PATCH 1/1] Preventive patch in the pin control subsystem to handle NULL check.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Srikanth, thanks for your patch!

On Mon, Aug 27, 2018 at 10:39 AM Srikanth K H <srikanth.h@xxxxxxxxxxx> wrote:

 @@ -269,8 +269,9 @@ void pinconf_show_setting(struct seq_file *s,

>                 desc = pin_desc_get(setting->pctldev,
>                                     setting->data.configs.group_or_pin);
> -               seq_printf(s, "pin %s (%d)", desc->name,
> -                          setting->data.configs.group_or_pin);
> +               if (desc)
> +                       seq_printf(s, "pin %s (%d)", desc->name,
> +                                  setting->data.configs.group_or_pin);

Under what circumstances do you expect this to happen?
Did you provoke it with a real usecase during development?

We do not sprinkle NULL or error handling over code that
will not derail, and since this is in debugfs we are even more
lax.

If it annoys users (which would then be developers using
debugfs during development), then we need to look into it.

Yours,
Linus Walleij



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux