[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3h5w2rtv7.fsf@t19.piap.pl>
Date: Tue, 14 Oct 2025 06:26:52 +0200
From: Krzysztof Hałasa <khalasa@...p.pl>
To: Kriish Sharma <kriish.sharma2006@...il.com>
Cc: khc@...waw.pl, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
skhan@...uxfoundation.org, david.hunter.linux@...il.com
Subject: Re: [PATCH net-next v3] hdlc_ppp: fix potential null pointer in
ppp_cp_event logging
Kriish Sharma <kriish.sharma2006@...il.com> writes:
> Update proto_name() to return "LCP" by default instead of NULL.
> This change silences the compiler without changing existing behavior
> and removes the need for the local 'pname' variable in ppp_cp_event.
>
> Suggested-by: Krzysztof Hałasa <khalasa@...p.pl>
> Signed-off-by: Kriish Sharma <kriish.sharma2006@...il.com>
Thanks, and
Acked-by: Krzysztof Hałasa <khalasa@...p.pl>
> --- a/drivers/net/wan/hdlc_ppp.c
> +++ b/drivers/net/wan/hdlc_ppp.c
> @@ -126,14 +126,12 @@ static inline struct proto *get_proto(struct net_device *dev, u16 pid)
> static inline const char *proto_name(u16 pid)
> {
> switch (pid) {
> - case PID_LCP:
> - return "LCP";
> case PID_IPCP:
> return "IPCP";
> case PID_IPV6CP:
> return "IPV6CP";
> default:
> - return NULL;
> + return "LCP";
> }
> }
>
--
Krzysztof "Chris" Hałasa
Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa
Powered by blists - more mailing lists