Re: [PATCH v6 13/14] platform/x86: wmi: create character devices when requested by drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 09 October 2017 17:51:51 Mario Limonciello wrote:
> +	/* make sure we're not calling a higher instance than exists*/
> +	if (_IOC_NR(cmd) > wblock->gblock.instance_count - 1)
> +		return -EINVAL;

Is this condition really working? instance_count is unsigned, cmd is
also unsigned... and when instance_count is zero, then IIRC error would
not be thrown.

-- 
Pali Rohár
pali.rohar@xxxxxxxxx



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux