]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ks7010: remove redundant auth_type check
authorColin Ian King <colin.king@canonical.com>
Mon, 18 Mar 2019 10:57:49 +0000 (10:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Mar 2019 13:31:39 +0000 (14:31 +0100)
commit8fe7563b17a5346aa335b9967df5a92b5eac2a9d
treec64adeddbfe9ab6a56fe2bcdf93b8132204e6473
parent27c4c0dbd1e4ed2d1a716ab824037a9af525e1ba
staging: ks7010: remove redundant auth_type check

The range check on auth_type is redundant as there is a prior
check on the auth_type values and the only way the block is entered
is if auth_type is one of TYPE_PMK1, TYPE_GMK1 and TYPE_GMK2. Hence
the auth_type check can be removed.

Detected by static analysis with cppcheck.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c