When the query request with read descriptor opcode is completed, the
descriptor is copied from response UPIU to the buffer that the caller
has specified.  Unfortunately the source address of the descriptor is
broken due to the unnecessary address-of operator.

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Dolev Raviv <[email protected]>
Cc: Sujit Reddy Thumma <[email protected]>
Cc: Vinayak Holikatti <[email protected]>
Cc: Santosh Y <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: [email protected]
---
 drivers/scsi/ufs/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index a0f5ac2..7a319c6 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -454,8 +454,7 @@ void ufshcd_copy_query_response(struct ufs_hba *hba, struct 
ufshcd_lrb *lrbp)
 
        /* Get the descriptor */
        if (lrbp->ucd_rsp_ptr->qr.opcode == UPIU_QUERY_OPCODE_READ_DESC) {
-               u8 *descp = (u8 *)&lrbp->ucd_rsp_ptr +
-                               GENERAL_UPIU_REQUEST_SIZE;
+               u8 *descp = (u8 *)lrbp->ucd_rsp_ptr + GENERAL_UPIU_REQUEST_SIZE;
                u16 len;
 
                /* data segment length */
-- 
1.8.3.1

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

Reply via email to