diff mbox

[2/2] bfa: Fix incorrect de-reference of pointer

Message ID 1439462512-1911-3-git-send-email-anil.gurumurthy@qlogic.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anil Gurumurthy Aug. 13, 2015, 10:41 a.m. UTC
From: Anil Gurumurthy <anil.gurumurthy@qlogic.com>

Signed-off-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Tested-by: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
---
 drivers/scsi/bfa/bfa_ioc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ewan Milne Sept. 3, 2015, 2:32 p.m. UTC | #1
On Thu, 2015-08-13 at 06:41 -0400, anil.gurumurthy@qlogic.com wrote:
> From: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
> 
> Signed-off-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
> Tested-by: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
> ---
>  drivers/scsi/bfa/bfa_ioc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
> index 4e71044..98f7e8c 100644
> --- a/drivers/scsi/bfa/bfa_ioc.c
> +++ b/drivers/scsi/bfa/bfa_ioc.c
> @@ -3878,7 +3878,7 @@ bfa_sfp_show_comp(struct bfa_sfp_s *sfp, struct bfi_mbmsg_s *msg)
>  		bfa_trc(sfp, sfp->data_valid);
>  		if (sfp->data_valid) {
>  			u32	size = sizeof(struct sfp_mem_s);
> -			u8 *des = (u8 *) &(sfp->sfpmem);
> +			u8 *des = (u8 *)(sfp->sfpmem);
>  			memcpy(des, sfp->dbuf_kva, size);
>  		}
>  		/*

Reviewed-by: Ewan D. Milne <emilne@redhat.com>


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 4e71044..98f7e8c 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -3878,7 +3878,7 @@  bfa_sfp_show_comp(struct bfa_sfp_s *sfp, struct bfi_mbmsg_s *msg)
 		bfa_trc(sfp, sfp->data_valid);
 		if (sfp->data_valid) {
 			u32	size = sizeof(struct sfp_mem_s);
-			u8 *des = (u8 *) &(sfp->sfpmem);
+			u8 *des = (u8 *)(sfp->sfpmem);
 			memcpy(des, sfp->dbuf_kva, size);
 		}
 		/*