mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-22 05:44:31 +08:00
cab30a9835
If 'qhp' is NULL then 'wq' is also NULL:
struct t4_wq *wq = qhp ? &qhp->wq : NULL;
...
ret = poll_cq(wq, ...);
if (ret)
goto out;
poll_cq(wq, ...) always returns a non-zero status if 'wq' is NULL,
either on a t4_next_cqe() error or on a 'wq == NULL' check.
Therefore, checking 'qhp' again after poll_cq() is redundant.
BTW, there're also 'qhp' dereference cases below poll_cq() without
any checks (c4iw_invalidate_mr(qhp->rhp,...)).
Detected using the static analysis tool - Svace.
Fixes:
|
||
---|---|---|
.. | ||
cm.c | ||
cq.c | ||
device.c | ||
ev.c | ||
id_table.c | ||
iw_cxgb4.h | ||
Kconfig | ||
Makefile | ||
mem.c | ||
provider.c | ||
qp.c | ||
resource.c | ||
restrack.c | ||
t4.h | ||
t4fw_ri_api.h |