bna: potential null dereference

From: Jiri Slaby
Date: Sat Sep 04 2010 - 09:00:01 EST


Hi,

stanse found a potential null dereference:
bnad_cb_tx_cleanup
-> struct bnad_unmap_q *unmap_q = tcb->unmap_q;
-> -- tcb cannot be null now --
-> if (!tcb || (!tcb->unmap_q))

The thing is I have no idea whether the second parameter of cleanup may
be null (move assignment after the check) or not (remove the check)

Could you fix that?

thanks,
--
js
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/