* [patch] scsi/qla2xxx: check for null consistently
@ 2010-05-22 20:18 Dan Carpenter
2010-05-25 18:48 ` Giridhar Malavali
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-22 20:18 UTC (permalink / raw)
To: Andrew Vasquez
Cc: linux-driver, James E.J. Bottomley, Giridhar Malavali,
Anirban Chakraborty, linux-scsi, kernel-janitors
We assume that "ha->cs84xx" can be null on the previous line, so we
should check it here as well.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 3b70860..ad22baa 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1211,7 +1211,7 @@ qla24xx_84xx_fw_version_show(struct device *dev,
if (ha->cs84xx && ha->cs84xx->op_fw_version = 0)
rval = qla84xx_verify_chip(vha, status);
- if ((rval = QLA_SUCCESS) && (status[0] = 0))
+ if (ha->cs84xx && rval = QLA_SUCCESS && status[0] = 0)
return snprintf(buf, PAGE_SIZE, "%u\n",
(uint32_t)ha->cs84xx->op_fw_version);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] scsi/qla2xxx: check for null consistently
2010-05-22 20:18 [patch] scsi/qla2xxx: check for null consistently Dan Carpenter
@ 2010-05-25 18:48 ` Giridhar Malavali
0 siblings, 0 replies; 2+ messages in thread
From: Giridhar Malavali @ 2010-05-25 18:48 UTC (permalink / raw)
To: Dan Carpenter, Andrew Vasquez
Cc: Linux Driver, James E.J. Bottomley, Anirban Chakraborty,
LinuxSCSI, kernel-janitors@vger.kernel.org
On 5/22/10 1:18 PM, "Dan Carpenter" <error27@gmail.com> wrote:
> We assume that "ha->cs84xx" can be null on the previous line, so we
> should check it here as well.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> index 3b70860..ad22baa 100644
> --- a/drivers/scsi/qla2xxx/qla_attr.c
> +++ b/drivers/scsi/qla2xxx/qla_attr.c
> @@ -1211,7 +1211,7 @@ qla24xx_84xx_fw_version_show(struct device *dev,
> if (ha->cs84xx && ha->cs84xx->op_fw_version = 0)
> rval = qla84xx_verify_chip(vha, status);
>
> - if ((rval = QLA_SUCCESS) && (status[0] = 0))
> + if (ha->cs84xx && rval = QLA_SUCCESS && status[0] = 0)
> return snprintf(buf, PAGE_SIZE, "%u\n",
> (uint32_t)ha->cs84xx->op_fw_version);
>
The checking for ha->cs84xx is redundant here since earlier check make sure
that this code does not execute for non ISP 84xx ISPs. I will cleanup and
resubmit the changes.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-25 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 20:18 [patch] scsi/qla2xxx: check for null consistently Dan Carpenter
2010-05-25 18:48 ` Giridhar Malavali
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).