diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-08 10:49:28 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-08 10:49:28 -0700 |
commit | 00fda1682efdbd62a20a8a21aee52d994c323c7f (patch) | |
tree | f49cee6c892019f193bf29985604951dd81ea94d /drivers/block/nvme-scsi.c | |
parent | 1c4b1d73bacc546ba4e42f7eb4cb88c54139820b (diff) | |
parent | d4a4f75cd8f29cd9464a5a32e9224a91571d6649 (diff) |
Merge 4.1-rc7 into tty-next
This fixes up a merge issue with the amba-pl011.c driver, and we want
the fixes in this branch as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block/nvme-scsi.c')
-rw-r--r-- | drivers/block/nvme-scsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/nvme-scsi.c b/drivers/block/nvme-scsi.c index 88f13c525712..44f2514fb775 100644 --- a/drivers/block/nvme-scsi.c +++ b/drivers/block/nvme-scsi.c @@ -2257,7 +2257,8 @@ static int nvme_trans_inquiry(struct nvme_ns *ns, struct sg_io_hdr *hdr, page_code = GET_INQ_PAGE_CODE(cmd); alloc_len = GET_INQ_ALLOC_LENGTH(cmd); - inq_response = kmalloc(alloc_len, GFP_KERNEL); + inq_response = kmalloc(max(alloc_len, STANDARD_INQUIRY_LENGTH), + GFP_KERNEL); if (inq_response == NULL) { res = -ENOMEM; goto out_mem; |