On Wed, 29 Oct 2025 20:36:19 -0700
Dimon Zhao <[email protected]> wrote:

> Coverity issue: 490942
> Coverity issue: 490943
> Coverity issue: 490946
> Coverity issue: 490947
> Coverity issue: 490949
> Coverity issue: 490950
> Coverity issue: 490951
> Coverity issue: 490952
> Coverity issue: 490953
> Coverity issue: 490954
> Coverity issue: 490955
> Coverity issue: 490957
> Coverity issue: 490958
> Coverity issue: 490959
> Fixes: a1c5ffa13b2c ("net/nbl: add channel layer")
> Fixes: dc955cd24c8f ("net/nbl: add coexistence mode")
> Fixes: 93b38df5a2ec ("net/nbl: support basic configuration")
> 

Automated code review with AI spotted issue with this patch.
Please address and resubmit.

Patch 5/9: net/nbl: fix issues reported by Coverity

Author: Dimon Zhao
Verdict: ❌ Needs revision - bug introduced
Check   Status
Subject ≤60 chars       ✅ (40 chars)
Prefix correct  ✅
Coverity issue tags     ✅
Fixes tags      ✅
Cc: [email protected]     ✅
Signed-off-by   ✅

Issues:

    Error - Dead code introduced (lines 41-47 in nbl_userdev.c):

c

   ret = ioctl(common->devfd, NBL_DEV_USER_GET_BAR_SIZE, &bar_size);
   if (ret) {
       NBL_LOG(ERR, "nbl userdev get bar size failed");
       goto close_eventfd;
   }

   if (!ret) {  // <-- ALWAYS TRUE - dead code!

After adding the error check with goto, the subsequent if (!ret) condition can 
never be false. The if (!ret) block should be removed or restructured.

    Warning (line 53): int ret = 0; - Unnecessary initialization; value is 
immediately overwritten on line 60.

Reply via email to