Re: [PATCH] drm/vmwgfx: clean up some error pointer checking

2022-07-20 Thread Zack Rusin
On Tue, 2022-07-19 at 12:47 +0300, Dan Carpenter wrote: > The vmw_user_bo_noref_lookup() function cannot return NULL. If it > could, then this function would return PTR_ERR(NULL) which is success. > Returning success without initializing "*vmw_bo_p = vmw_bo;" would > lead to an uninitialized varia

[PATCH] drm/vmwgfx: clean up some error pointer checking

2022-07-19 Thread Dan Carpenter
The vmw_user_bo_noref_lookup() function cannot return NULL. If it could, then this function would return PTR_ERR(NULL) which is success. Returning success without initializing "*vmw_bo_p = vmw_bo;" would lead to an uninitialized variable bug in the caller. Smatch complains about this: drivers/gp