mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
qla4xxx: Fix smatch warning in func qla4xxx_get_ep_param
Fix following smatch warning:- drivers/scsi/qla4xxx/ql4_os.c:1752 qla4xxx_get_ep_param() warn: variable dereferenced before check 'qla_ep' (see line 1745) Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
f65241e729
commit
73597bdd83
1 changed files with 3 additions and 3 deletions
|
@ -1742,6 +1742,9 @@ static int qla4xxx_get_ep_param(struct iscsi_endpoint *ep,
|
||||||
struct sockaddr *dst_addr;
|
struct sockaddr *dst_addr;
|
||||||
struct scsi_qla_host *ha;
|
struct scsi_qla_host *ha;
|
||||||
|
|
||||||
|
if (!qla_ep)
|
||||||
|
return -ENOTCONN;
|
||||||
|
|
||||||
ha = to_qla_host(qla_ep->host);
|
ha = to_qla_host(qla_ep->host);
|
||||||
DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__,
|
DEBUG2(ql4_printk(KERN_INFO, ha, "%s: host: %ld\n", __func__,
|
||||||
ha->host_no));
|
ha->host_no));
|
||||||
|
@ -1749,9 +1752,6 @@ static int qla4xxx_get_ep_param(struct iscsi_endpoint *ep,
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case ISCSI_PARAM_CONN_PORT:
|
case ISCSI_PARAM_CONN_PORT:
|
||||||
case ISCSI_PARAM_CONN_ADDRESS:
|
case ISCSI_PARAM_CONN_ADDRESS:
|
||||||
if (!qla_ep)
|
|
||||||
return -ENOTCONN;
|
|
||||||
|
|
||||||
dst_addr = (struct sockaddr *)&qla_ep->dst_addr;
|
dst_addr = (struct sockaddr *)&qla_ep->dst_addr;
|
||||||
if (!dst_addr)
|
if (!dst_addr)
|
||||||
return -ENOTCONN;
|
return -ENOTCONN;
|
||||||
|
|
Loading…
Reference in a new issue