]> asedeno.scripts.mit.edu Git - linux.git/commit
udlfb: fix some inconsistent NULL checking
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 20 Dec 2018 18:13:07 +0000 (19:13 +0100)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 20 Dec 2018 18:13:07 +0000 (19:13 +0100)
commitc143a559b073aeea688b9bb7c5b46f3cf322d569
treef004548efca498d415564a81c2250bc7cb96229d
parent31d1b7710262fba12282b24083f20dc76e0efc93
udlfb: fix some inconsistent NULL checking

In the current kernel, then kzalloc() can't fail for small allocations,
but if it did fail then we would have a NULL dereference in the error
handling.  Also in dlfb_usb_disconnect() if "info" were NULL then it
would cause an Oops inside the unregister_framebuffer() function but it
can't be NULL so let's remove that check.

Fixes: 68a958a915ca ("udlfb: handle unplug properly")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Bernie Thompson <bernie@plugable.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Wen Yang <wen.yang99@zte.com.cn>
[b.zolnierkie: added "Fixes:" tag]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/udlfb.c