Re: [PATCH] dm: crash dump: remove redundant NULL check before kvfree()
From: Pratyush Yadav
Date: Fri Jul 03 2026 - 08:03:39 EST
On Fri, Jul 03 2026, mdshahid03@xxxxxxxxx wrote:
> From: Mohammad Shahid <mdshahid03@xxxxxxxxx>
>
> kvfree() safely handles NULL pointers, so the explicit NULL check
> before calling kvfree() is unnecessary.
>
> This issue was reported by ifnullfree.cocci.
>
> Signed-off-by: Mohammad Shahid <mdshahid03@xxxxxxxxx>
Reviewed-by: Pratyush Yadav <pratyush@xxxxxxxxxx>
BTW, Sashiko [0] pointed out a bunch of problems in the surrounding code,
and they seem to look legit. If you're interested, help in fixing them
would be much appreciated.
[0] https://sashiko.dev/#/patchset/20260703112642.65498-1-mdshahid03@xxxxxxxxx
[...]
--
Regards,
Pratyush Yadav