Skip to content
  • Dan Carpenter's avatar
    udlfb: fix some inconsistent NULL checking · c143a559
    Dan Carpenter authored
    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: 68a958a9
    
     ("udlfb: handle unplug properly")
    Signed-off-by: default avatarDan 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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    c143a559