Message ID | 1616406794-105194-1-git-send-email-jiapeng.chong@linux.alibaba.com |
---|---|
State | New |
Headers | show |
Series | cxgb4: Remove redundant NULL check | expand |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c index 6c85a10..d2ba40c 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c @@ -3536,8 +3536,7 @@ int cudbg_collect_qdesc(struct cudbg_init *pdbg_init, } out_free: - if (data) - kvfree(data); + kvfree(data); #undef QDESC_GET_FLQ #undef QDESC_GET_RXQ
Fix the following coccicheck warnings: ./drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:3540:2-8: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> --- drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)