Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vishal Verma and committed by
Matthew Wilcox
710a143d 76e0310c

+1 -1
+1 -1
drivers/block/nvme-scsi.c
··· 1653 1653 } 1654 1654 } 1655 1655 1656 - static u16 nvme_trans_modesel_get_mp(struct nvme_ns *ns, struct sg_io_hdr *hdr, 1656 + static int nvme_trans_modesel_get_mp(struct nvme_ns *ns, struct sg_io_hdr *hdr, 1657 1657 u8 *mode_page, u8 page_code) 1658 1658 { 1659 1659 int res = SNTI_TRANSLATION_SUCCESS;