Re: [PATCH] igb: Add null pointer check to igb_set_fw_version

From: Jakub Kicinski
Date: Tue Dec 12 2023 - 16:26:56 EST


On Mon, 11 Dec 2023 11:13:36 +0800 Kunwu Chan wrote:
> kasprintf() returns a pointer to dynamically allocated memory
> which can be NULL upon failure.
>
> Fixes: 1978d3ead82c ("intel: fix string truncation warnings")
> Cc: Kunwu Chan <kunwu.chan@xxxxxxxxxxx>
> Signed-off-by: Kunwu Chan <chentao@xxxxxxxxxx>

The allocation is rather pointless here.
Can you convert this code to use snprintf() instead?
--
pw-bot: cr