forked from luck/tmp_suning_uos_patched
drm/vboxvideo: fix a NULL vs IS_ERR() check
[ Upstream commit cebbb5c46d0cb0615fd0c62dea9b44273d0a9780 ]
The devm_gen_pool_create() function never returns NULL, it returns
error pointers.
Fixes: 4cc9b56545
("drm/vboxvideo: Use devm_gen_pool_create")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211118111233.GA1147@kili
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
43220a61e7
commit
a33eef23a6
|
@ -123,8 +123,8 @@ int vbox_hw_init(struct vbox_private *vbox)
|
|||
/* Create guest-heap mem-pool use 2^4 = 16 byte chunks */
|
||||
vbox->guest_pool = devm_gen_pool_create(vbox->ddev.dev, 4, -1,
|
||||
"vboxvideo-accel");
|
||||
if (!vbox->guest_pool)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(vbox->guest_pool))
|
||||
return PTR_ERR(vbox->guest_pool);
|
||||
|
||||
ret = gen_pool_add_virt(vbox->guest_pool,
|
||||
(unsigned long)vbox->guest_heap,
|
||||
|
|
Loading…
Reference in New Issue
Block a user