Re: [PATCH -next] drm/vgem: Fix return value check in vgem_init()

From: Daniel Vetter
Date: Mon May 22 2017 - 03:48:21 EST


On Sun, May 21, 2017 at 01:09:05PM +0100, Chris Wilson wrote:
> On Sun, May 21, 2017 at 01:19:39AM +0000, Wei Yongjun wrote:
> > From: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
> >
> > In case of error, the function platform_device_register_simple() returns
> > ERR_PTR() and never returns NULL. The NULL test in the return value
> > check should be replaced with IS_ERR().
> >
> > Fixes: 315f0242aa2b ("drm/vgem: Convert to a struct drm_device subclass")
>
> This is wrong, the bug was introduced in
> af33a9190d02 ("drm/vgem: Enable dmabuf import interfaces")
> not that it matters since it is the same tag.

Fixed.

> > Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
>
> Checked it is an ERR_PTR return on failure, so
> Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Applied, thanks for patch&review.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch