[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241126130121.GO160612@unreal>
Date: Tue, 26 Nov 2024 15:01:21 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: oe-kbuild@...ts.linux.dev, Selvin Xavier <selvin.xavier@...adcom.com>,
lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Damodharam Ammepalli <damodharam.ammepalli@...adcom.com>
Subject: Re: drivers/infiniband/hw/bnxt_re/qplib_fp.c:1090
bnxt_qplib_create_qp() error: we previously assumed 'res->dattr' could be
null (see line 985)
On Sat, Nov 23, 2024 at 01:14:25PM +0300, Dan Carpenter wrote:
> [ I reported this last year and generally I try to report only report these
> warnings one time, but it still feels like perhaps a bug. Mostly likely with
> these the NULL check can be removed. But smatch still warns about it even
> with cross function analysis.
> https://lore.kernel.org/all/c2ff81f3-5de6-4498-b157-909d89e74fcb@stanley.mountain/
> -dan ]
<...>
> 07f830ae4913d0 Selvin Xavier 2023-12-07 @985 if (res->dattr)
> ^^^^^^^^^^
> The new code assumes this can be NULL
Yes, this if can be removed. res->dattr != NULL in all places.
Thanks
Powered by blists - more mailing lists