Re: [PATCH net v2] hdlc_ppp: fix potential null pointer in ppp_cp_event logging
From: Kriish Sharma
Date: Fri Oct 03 2025 - 09:46:36 EST
Hi Chris,
Thanks for the suggestion. That makes sense I’ll drop the PID_LCP case
as well in v3 to simplify the code.
I’ll resend the patch targeting net-next once the merge window reopens.
Best regards,
Kriish
On Fri, Oct 3, 2025 at 6:03 PM Krzysztof Hałasa <khalasa@xxxxxxx> wrote:
>
> Hi Kriish,
>
> Kriish Sharma <kriish.sharma2006@xxxxxxxxx> 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