diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-05-02 15:59:56 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-05-03 16:32:33 +0200 |
commit | 629f59ade8fc399beee839cb81369510c9c982b6 (patch) | |
tree | c86a0fbff3e4c29c6db1673958156343d278cfcb /drivers/gpu/drm/udl/udl_main.c | |
parent | 03877d621db082610c9b7602c6e8cd6ebcb75a8f (diff) |
drm/udl: delete dead code
The "unode" pointer cannot be NULL here and checking for it causes
Smatch warnings:
drivers/gpu/drm/udl/udl_main.c:259 udl_get_urb_locked()
warn: can 'unode' even be NULL?
Fortunately, it's just harmless dead code which can be removed. It's
left over from commit c5c354a3a472 ("drm/udl: Fix inconsistent urbs.count
value during udl_free_urb_list()").
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/e0e35421-8746-43b6-971e-e25d1cd1d6a7@kili.mountain
Diffstat (limited to 'drivers/gpu/drm/udl/udl_main.c')
-rw-r--r-- | drivers/gpu/drm/udl/udl_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c index 061cb88c08a2..3ebe2ce55dfd 100644 --- a/drivers/gpu/drm/udl/udl_main.c +++ b/drivers/gpu/drm/udl/udl_main.c @@ -255,7 +255,7 @@ static struct urb *udl_get_urb_locked(struct udl_device *udl, long timeout) list_del_init(&unode->entry); udl->urbs.available--; - return unode ? unode->urb : NULL; + return unode->urb; } #define GET_URB_TIMEOUT HZ |