devlink: health: Fix nla_nest_end in error flow
authorMoshe Shemesh <moshe@nvidia.com>
Tue, 14 Feb 2023 16:37:58 +0000 (18:37 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Feb 2023 03:15:44 +0000 (19:15 -0800)
commitbfd4e6a5dbbc12f77620602e764ac940ccb159de
treec98029797739fe929be309d9d5d0982aeb6f1e6d
parentb4740e3a8137faa5831c690d0bf0b46f41008baf
devlink: health: Fix nla_nest_end in error flow

devlink_nl_health_reporter_fill() error flow calls nla_nest_end(). Fix
it to call nla_nest_cancel() instead.

Note the bug is harmless as genlmsg_cancel() cancel the entire message,
so no fixes tag added.

Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/devlink/leftover.c