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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 variable bug in the caller.  Smatch complains
> about this:
> 
> drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1177 vmw_translate_mob_ptr() warn: passing zero to 'PTR_ERR'
> drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1314 vmw_cmd_dx_bind_query() error: uninitialized symbol 'vmw_bo'.

Thanks, Dan.

I'll push it through the drm-misc tree.

z




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux