]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
regulator: tps6524x: Remove unnecessary memset
authorLiao Yuanhong <liaoyuanhong@vivo.com>
Thu, 7 Aug 2025 12:39:49 +0000 (20:39 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 11 Aug 2025 13:08:52 +0000 (14:08 +0100)
devm_kzalloc() has already been initialized to full 0 space, there is no
need to use memset() to initialize again.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Link: https://patch.msgid.link/20250807123949.495193-1-liaoyuanhong@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/tps6524x-regulator.c

index 3fee7e38c68bc9b149ad07fab5c921fe1a92f9cf..6beb51293e8e1dfa0abcb7acf41572c31df8e6cd 100644 (file)
@@ -598,7 +598,6 @@ static int pmic_probe(struct spi_device *spi)
 
        spi_set_drvdata(spi, hw);
 
-       memset(hw, 0, sizeof(struct tps6524x));
        hw->dev = dev;
        hw->spi = spi;
        mutex_init(&hw->lock);