Patch "regmap: Add missing map->bus check" has been added to the 5.15-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

    regmap: Add missing map->bus check

to the 5.15-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:
     regmap-add-missing-map-bus-check.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 2ff59fe40f56d09f27b0104d587c164fe711ad23
Author: Marek Vasut <marex@xxxxxxx>
Date:   Mon May 9 02:30:35 2022 +0200

    regmap: Add missing map->bus check
    
    [ Upstream commit 5c422f0b970d287efa864b8390a02face404db5d ]
    
    The map->bus can be NULL here, add the missing NULL pointer check.
    
    Fixes: d77e745613680 ("regmap: Add bulk read/write callbacks into regmap_config")
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Marek Vasut <marex@xxxxxxx>
    Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Cc: Mark Brown <broonie@xxxxxxxxxx>
    To: linux-kernel@xxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20220509003035.225272-1-marex@xxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 6adb345866610..893b0615935e9 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1836,7 +1836,7 @@ static int _regmap_raw_write_impl(struct regmap *map, unsigned int reg,
 				 map->format.reg_bytes +
 				 map->format.pad_bytes +
 				 val_len);
-	else if (map->bus->gather_write)
+	else if (map->bus && map->bus->gather_write)
 		ret = map->bus->gather_write(map->bus_context, map->work_buf,
 					     map->format.reg_bytes +
 					     map->format.pad_bytes,




[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