summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-03-02 22:23:38 +0000
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>2019-03-11 14:43:14 +0100
commit1cbbd85fbcdce186649ce778ff1e08e3df35d285 (patch)
tree3c1cd40cf3b3d45aa1ddee0977697039610600b3
parent78b92f5f00cb3dbca0553f50847232eef60ccff4 (diff)
downloadlinux-1cbbd85fbcdce186649ce778ff1e08e3df35d285.tar.bz2
HID: uclogic: remove redudant duplicated null check on ver_ptr
Currently ver_ptr is being null checked twice, once before calling usb_string and once afterwards. The second null check is redundant and can be removed, remove it. Detected by CoverityScan, CID#1477308 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
-rw-r--r--drivers/hid/hid-uclogic-params.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
index 7710d9f957da..0187c9f8fc22 100644
--- a/drivers/hid/hid-uclogic-params.c
+++ b/drivers/hid/hid-uclogic-params.c
@@ -735,10 +735,6 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
goto cleanup;
}
rc = usb_string(udev, 201, ver_ptr, ver_len);
- if (ver_ptr == NULL) {
- rc = -ENOMEM;
- goto cleanup;
- }
if (rc == -EPIPE) {
*ver_ptr = '\0';
} else if (rc < 0) {