Subject: Re: [PATCH net v2] hdlc_ppp: fix potential null pointer in ppp_cp_event logging

From: Krzysztof Hałasa <[email-masked]>
Date: Fri, 03 Oct 2025 14:33:49 +0200

Hi Kriish,

Kriish Sharma <[email-masked]> writes:

> --- a/drivers/net/wan/hdlc_ppp.c
> +++ b/drivers/net/wan/hdlc_ppp.c
> @@ -133,7 +133,7 @@ static inline const char *proto_name(u16 pid)
>         case PID_IPV6CP:
>                 return "IPV6CP";
>         default:
> -               return NULL;
> +               return "LCP";
>         }
>  }

I'd also remove the "PID_LCP" case as well (just those 2 lines
above IPCP case), the code will probably be simpler to understand
(the compiler won't care I guess).
-- 
Krzysztof "Chris" Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa