lkml.org 
[lkml]   [2017]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 13/14] platform/x86: wmi: create character devices when requested by drivers
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@gmail.com

\
 
 \ /
  Last update: 2017-10-10 21:12    [W:1.241 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site