]> git.hungrycats.org Git - linux/commit
net: sched: avoid printing uninitialized link speed
authorJakub Kicinski <kuba@kernel.org>
Tue, 9 Jun 2026 18:33:53 +0000 (11:33 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 11 Jun 2026 13:44:55 +0000 (15:44 +0200)
commit518d8d0199538a4d6d5e51064044ece71e0c42e7
treeb59a8b027a6b3c3c331ce16f46ad7d5e9cea5edc
parent6e12a8894e027ed33c562e2bf993ab61a7e2b75d
net: sched: avoid printing uninitialized link speed

sch_cbs and sch_taprio print ecmd.base.speed, even if
netif_get_link_ksettings() failed. When netif_get_link_ksettings()
fails the ecmd may not be initialized.

Use the always-initialized speed variable instead.
The semantics change slightly because UNKNOWN will
never be printed, but that doesn't seem important
enough to complicate the code for.

This is a _dbg() print, anyway.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20260609183353.1109641-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/sched/sch_cbs.c
net/sched/sch_taprio.c