dm ioctl: drop always-false condition
authorSergey Shtylyov <s.shtylyov@omp.ru>
Tue, 17 Jan 2023 20:59:55 +0000 (23:59 +0300)
committerMike Snitzer <snitzer@kernel.org>
Thu, 2 Feb 2023 19:26:09 +0000 (14:26 -0500)
commit151d812251202aa0dce1fdeabd64794292d40b75
tree87056e0174a2364649968000948aeb3265e24664
parentaa56b9b75996ff4c76a0a4181c2fa0206c3d91cc
dm ioctl: drop always-false condition

The expression 'indata[3] > ULONG_MAX' always evaluates to false since
indata[] is declared as an array of *unsigned long* elements and #define
ULONG_MAX represents the max value of that exact type...

Note that gcc seems to be able to detect the dead code here and eliminate
this check anyway...

Found by Linux Verification Center (linuxtesting.org) with the SVACE static
analysis tool.

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-ioctl.c