Re: [PATCH] IB/mlx5: Fix potential NULL dereference in query_device
From: Prathamesh Deshpande
Date: Tue Mar 31 2026 - 17:58:01 EST
On Tue, Mar 31, 2026 at 10:04:00PM +0300, Leon Romanovsky wrote:
> Kernel-space callers don't use uverbs path. It is solely for the
> user-space access.
Hi Leon,
Understood. Smatch flags this as an "inconsistent NULL check" because
'uhw' is explicitly checked at line 967 (if (uhw && ...)).
If 'uhw' is guaranteed to be non-NULL in this path, would you prefer
a patch removing the redundant check at line 967 instead? This would
align the logic and silence the static analysis warning.
Thanks,
Prathamesh