Patch "fbdev: vermilion: decrease reference count in error path" has been added to the 5.4-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

    fbdev: vermilion: decrease reference count in error path

to the 5.4-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:
     fbdev-vermilion-decrease-reference-count-in-error-pa.patch
and it can be found in the queue-5.4 subdirectory.

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



commit e9e543a3f02ba92917934c918f356c8b5f37569d
Author: Xiongfeng Wang <wangxiongfeng2@xxxxxxxxxx>
Date:   Mon Nov 14 16:56:54 2022 +0800

    fbdev: vermilion: decrease reference count in error path
    
    [ Upstream commit 001f2cdb952a9566c77fb4b5470cc361db5601bb ]
    
    pci_get_device() will increase the reference count for the returned
    pci_dev. For the error path, we need to use pci_dev_put() to decrease
    the reference count.
    
    Fixes: dbe7e429fedb ("vmlfb: framebuffer driver for Intel Vermilion Range")
    Signed-off-by: Xiongfeng Wang <wangxiongfeng2@xxxxxxxxxx>
    Signed-off-by: Helge Deller <deller@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c
index 498038a964ee..ea6671723606 100644
--- a/drivers/video/fbdev/vermilion/vermilion.c
+++ b/drivers/video/fbdev/vermilion/vermilion.c
@@ -277,8 +277,10 @@ static int vmlfb_get_gpu(struct vml_par *par)
 
 	mutex_unlock(&vml_mutex);
 
-	if (pci_enable_device(par->gpu) < 0)
+	if (pci_enable_device(par->gpu) < 0) {
+		pci_dev_put(par->gpu);
 		return -ENODEV;
+	}
 
 	return 0;
 }



[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