mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-13 22:14:20 +08:00
cxgb4: cleanup error code in setup_sge_queues_uld()
The caller doesn't care about the error codes, they only check for zero vs non-zero. Still, it's better to preserve the negative error codes from alloc_uld_rxqs() instead of changing it to 1. We can also return directly if there is a failure. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d36ceaef8f
commit
bda6752f3d
@ -174,13 +174,14 @@ static int
|
||||
setup_sge_queues_uld(struct adapter *adap, unsigned int uld_type, bool lro)
|
||||
{
|
||||
struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type];
|
||||
int i, ret = 0;
|
||||
int i, ret;
|
||||
|
||||
ret = !(!alloc_uld_rxqs(adap, rxq_info, lro));
|
||||
ret = alloc_uld_rxqs(adap, rxq_info, lro);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Tell uP to route control queue completions to rdma rspq */
|
||||
if (adap->flags & CXGB4_FULL_INIT_DONE &&
|
||||
!ret && uld_type == CXGB4_ULD_RDMA) {
|
||||
if (adap->flags & CXGB4_FULL_INIT_DONE && uld_type == CXGB4_ULD_RDMA) {
|
||||
struct sge *s = &adap->sge;
|
||||
unsigned int cmplqid;
|
||||
u32 param, cmdop;
|
||||
|
Loading…
Reference in New Issue
Block a user