Patch "drm/vc4: fix error code in vc4_create_object()" has been added to the 4.9-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    drm/vc4: fix error code in vc4_create_object()

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-vc4-fix-error-code-in-vc4_create_object.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit eec345e3779d41b7b467588a8046ad9a8bca761e
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Thu Nov 18 14:14:16 2021 +0300

    drm/vc4: fix error code in vc4_create_object()
    
    [ Upstream commit 96c5f82ef0a145d3e56e5b26f2bf6dcd2ffeae1c ]
    
    The ->gem_create_object() functions are supposed to return NULL if there
    is an error.  None of the callers expect error pointers so returing one
    will lead to an Oops.  See drm_gem_vram_create(), for example.
    
    Fixes: c826a6e10644 ("drm/vc4: Add a BO cache.")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20211118111416.GC1147@kili
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c
index d53e805d392f9..64fc99cf54d5b 100644
--- a/drivers/gpu/drm/vc4/vc4_bo.c
+++ b/drivers/gpu/drm/vc4/vc4_bo.c
@@ -198,7 +198,7 @@ struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size)
 
 	bo = kzalloc(sizeof(*bo), GFP_KERNEL);
 	if (!bo)
-		return ERR_PTR(-ENOMEM);
+		return NULL;
 
 	mutex_lock(&vc4->bo_lock);
 	vc4->bo_stats.num_allocated++;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux