Patch "xen-pciback: Fix return in pm_ctrl_init()" has been added to the 4.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

    xen-pciback: Fix return in pm_ctrl_init()

to the 4.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:
     xen-pciback-fix-return-in-pm_ctrl_init.patch
and it can be found in the queue-4.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 bafbe2230b30bcf43eeb536cc2ed5c0aac5bd348
Author: YueHaibing <yuehaibing@xxxxxxxxxx>
Date:   Fri Oct 8 15:44:17 2021 +0800

    xen-pciback: Fix return in pm_ctrl_init()
    
    [ Upstream commit 4745ea2628bb43a7ec34b71763b5a56407b33990 ]
    
    Return NULL instead of passing to ERR_PTR while err is zero,
    this fix smatch warnings:
    drivers/xen/xen-pciback/conf_space_capability.c:163
     pm_ctrl_init() warn: passing zero to 'ERR_PTR'
    
    Fixes: a92336a1176b ("xen/pciback: Drop two backends, squash and cleanup some code.")
    Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
    Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
    Link: https://lore.kernel.org/r/20211008074417.8260-1-yuehaibing@xxxxxxxxxx
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/xen/xen-pciback/conf_space_capability.c b/drivers/xen/xen-pciback/conf_space_capability.c
index b1a1d7de0894e..daa2e89a50fa3 100644
--- a/drivers/xen/xen-pciback/conf_space_capability.c
+++ b/drivers/xen/xen-pciback/conf_space_capability.c
@@ -159,7 +159,7 @@ static void *pm_ctrl_init(struct pci_dev *dev, int offset)
 	}
 
 out:
-	return ERR_PTR(err);
+	return err ? ERR_PTR(err) : NULL;
 }
 
 static const struct config_field caplist_pm[] = {



[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