Patch "regmap: Add missing map->bus check" 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

    regmap: Add missing map->bus check

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:
     regmap-add-missing-map-bus-check.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 a10175cfa49ca94deac42d72a71d26a1aa4b2d68
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 6f580883c1973..aa9c6e0ff878d 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1648,7 +1648,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