Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3d6e1dc authored by Roel Kluin's avatar Roel Kluin Committed by James Bottomley
Browse files

[SCSI] pmcraid: redundant check in pmcraid_check_ioctl_buffer()



struct pmcraid_ioctl_header member buffer_length is unsigned, so this
check appears redundant.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarAnil Ravindranath <anil_ravindranath@pmc-sierra.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 6ce00cae
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -3751,12 +3751,6 @@ static int pmcraid_check_ioctl_buffer(
		return -EINVAL;
	}

	/* buffer length can't be negetive */
	if (hdr->buffer_length < 0) {
		pmcraid_err("ioctl: invalid buffer length specified\n");
		return -EINVAL;
	}

	/* check for appropriate buffer access */
	if ((_IOC_DIR(cmd) & _IOC_READ) == _IOC_READ)
		access = VERIFY_WRITE;