[PATCH net-next v2 09/11] qed: devlink health: use retained error fmsg API

From: Przemek Kitszel
Date: Tue Oct 17 2023 - 06:55:12 EST


Drop unneeded error checking.

devlink_fmsg_*() family of functions is now retaining errors,
so there is no need to check for them after each call.

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@xxxxxxxxx>
---
add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-2 (-2)
---
drivers/net/ethernet/qlogic/qed/qed_devlink.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_devlink.c b/drivers/net/ethernet/qlogic/qed/qed_devlink.c
index be5cc8b79bd5..dad8e617c393 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_devlink.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_devlink.c
@@ -66,12 +66,12 @@ qed_fw_fatal_reporter_dump(struct devlink_health_reporter *reporter,
return err;
}

- err = devlink_fmsg_binary_pair_put(fmsg, "dump_data",
- p_dbg_data_buf, dbg_data_buf_size);
+ devlink_fmsg_binary_pair_put(fmsg, "dump_data", p_dbg_data_buf,
+ dbg_data_buf_size);

vfree(p_dbg_data_buf);

- return err;
+ return 0;
}

static int
--
2.40.1