Re: [PATCH net v2] hdlc_ppp: fix potential null pointer in ppp_cp_event logging
From: Krzysztof Hałasa
Date: Fri Oct 03 2025 - 08:34:39 EST
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