[libata] do not memset() SCSI request buf in a get-reference style function

fixes INQUIRY command handling for ATAPI.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent e58d2eb0
......@@ -731,7 +731,6 @@ static unsigned int ata_scsi_rbuf_get(struct scsi_cmnd *cmd, u8 **buf_out)
buflen = cmd->request_bufflen;
}
memset(buf, 0, buflen);
*buf_out = buf;
return buflen;
}
......@@ -780,6 +779,7 @@ void ata_scsi_rbuf_fill(struct ata_scsi_args *args,
struct scsi_cmnd *cmd = args->cmd;
buflen = ata_scsi_rbuf_get(cmd, &rbuf);
memset(rbuf, 0, buflen);
rc = actor(args, rbuf, buflen);
ata_scsi_rbuf_put(cmd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment