Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b991c37 authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller
Browse files

bnx2x: Prevent null pointer dereference on error flow



If debug message is open and bnx2x_vfop_qdtor_cmd() were to fail,
the resulting print would have caused a null pointer dereference.

Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0907f34c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -470,11 +470,11 @@ static int bnx2x_vfop_qdtor_cmd(struct bnx2x *bp,
				 bnx2x_vfop_qdtor, cmd->done);
		return bnx2x_vfop_transition(bp, vf, bnx2x_vfop_qdtor,
					     cmd->block);
	}
	DP(BNX2X_MSG_IOV, "VF[%d] failed to add a vfop. rc %d\n",
	   vf->abs_vfid, vfop->rc);
	} else {
		BNX2X_ERR("VF[%d] failed to add a vfop\n", vf->abs_vfid);
		return -ENOMEM;
	}
}

static void
bnx2x_vf_set_igu_info(struct bnx2x *bp, u8 igu_sb_id, u8 abs_vfid)