summaryrefslogtreecommitdiffstats
path: root/drivers/block/nvme-scsi.c
diff options
context:
space:
mode:
authorVishal Verma <vishal.l.verma@linux.intel.com>2013-05-13 22:55:18 +0200
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2013-05-17 15:10:38 +0200
commit710a143dd870cd660b5ae26bb94b6da854376e91 (patch)
tree4349e99f8439f1f780d41a98acc26e3cf322ea28 /drivers/block/nvme-scsi.c
parentNVMe: Remove redundant version.h header include (diff)
downloadlinux-710a143dd870cd660b5ae26bb94b6da854376e91.tar.xz
linux-710a143dd870cd660b5ae26bb94b6da854376e91.zip
NVMe: Fix a signedness bug in nvme_trans_modesel_get_mp
nvme_trans_modesel_get_mp() was defined with a unsigned return type, but can return signed values. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Vishal Verma <vishal.l.verma@linux.intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block/nvme-scsi.c')
-rw-r--r--drivers/block/nvme-scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nvme-scsi.c b/drivers/block/nvme-scsi.c
index 64bde6886b43..102de2f52b5c 100644
--- a/drivers/block/nvme-scsi.c
+++ b/drivers/block/nvme-scsi.c
@@ -1653,7 +1653,7 @@ static void nvme_trans_modesel_save_bd(struct nvme_ns *ns, u8 *parm_list,
}
}
-static u16 nvme_trans_modesel_get_mp(struct nvme_ns *ns, struct sg_io_hdr *hdr,
+static int nvme_trans_modesel_get_mp(struct nvme_ns *ns, struct sg_io_hdr *hdr,
u8 *mode_page, u8 page_code)
{
int res = SNTI_TRANSLATION_SUCCESS;