devlink: remove a dubious assumption in fmsg dumping
authorJakub Kicinski <kuba@kernel.org>
Tue, 24 Jan 2023 03:52:31 +0000 (19:52 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Jan 2023 04:31:35 +0000 (20:31 -0800)
commit4373a023e0388fc19e27d37f61401bce6ff4c9d7
tree372e1262c61de2bfe4cf0f0121ea6f65640cc151
parent28113cfada8bce91c627b057f68cd723cac2cf73
devlink: remove a dubious assumption in fmsg dumping

Build bot detects that err may be returned uninitialized in
devlink_fmsg_prepare_skb(). This is not really true because
all fmsgs users should create at least one outer nest, and
therefore fmsg can't be completely empty.

That said the assumption is not trivial to confirm, so let's
follow the bots advice, anyway.

This code does not seem to have changed since its inception in
commit 1db64e8733f6 ("devlink: Add devlink formatted message (fmsg) API")

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20230124035231.787381-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/devlink/leftover.c