]> git.baikalelectronics.ru Git - kernel.git/commit
SFH: fix error return check for -ERESTARTSYS
authorColin Ian King <colin.king@canonical.com>
Fri, 30 Oct 2020 14:30:02 +0000 (14:30 +0000)
committerJiri Kosina <jkosina@suse.cz>
Thu, 12 Nov 2020 15:25:40 +0000 (16:25 +0100)
commit52b9a3d6e7a3359c8576607d6c8f4fb601383b4b
treeef801838ac33be7e46e1a1ffcf48f4be51b89f9d
parente063ae301e020ad6cd6fee9b3828a54eb03dbfbe
SFH: fix error return check for -ERESTARTSYS

Currently the check for the error return code -ERESTARTSYS is dead code
and never executed because a previous check for ret < 0 is catching this
and returning -ETIMEDOUT instead.  Fix this by checking for -ERESTARTSYS
before the more generic negative error code.

Addresses-Coverity: ("Logically dead code")
Fixes: 494b0f7402f6 ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Sandeep Singh <sandeep.singh@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/amd-sfh-hid/amd_sfh_hid.c