Patch "atm: firestream: check the return value of ioremap() in fs_init()" 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

    atm: firestream: check the return value of ioremap() in fs_init()

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:
     atm-firestream-check-the-return-value-of-ioremap-in-.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 bcc74ce63ecc140822045b4a15f4fd09309b544e
Author: Jia-Ju Bai <baijiaju1990@xxxxxxxxx>
Date:   Fri Feb 25 04:52:30 2022 -0800

    atm: firestream: check the return value of ioremap() in fs_init()
    
    [ Upstream commit d4e26aaea7f82ba884dcb4acfe689406bc092dc3 ]
    
    The function ioremap() in fs_init() can fail, so its return value should
    be checked.
    
    Reported-by: TOTE Robot <oslab@xxxxxxxxxxxxxxx>
    Signed-off-by: Jia-Ju Bai <baijiaju1990@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index 7cb2b863e653..7d74b7e1a837 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -1692,6 +1692,8 @@ static int fs_init(struct fs_dev *dev)
 	dev->hw_base = pci_resource_start(pci_dev, 0);
 
 	dev->base = ioremap(dev->hw_base, 0x1000);
+	if (!dev->base)
+		return 1;
 
 	reset_chip (dev);
   



[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