lkml.org 
[lkml]   [2017]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next] drm/vgem: Fix return value check in vgem_init()
On Sun, May 21, 2017 at 01:19:39AM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 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.

> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Checked it is an ERR_PTR return on failure, so
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

--
Chris Wilson, Intel Open Source Technology Centre

\
 
 \ /
  Last update: 2017-05-21 14:09    [W:1.506 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site