Skip to content

Commit 1fc2e76

Browse files
ColinIanKingbroonie
authored andcommitted
regulator: palmas: remove redundant initialization of pointer pdata
Pointer pdata is being initialized with a value that is never read. It is being re-assigned later on with the return from a devm_kzalloc call. Remove the redundant initialization, cleans up clang scan build warning: drivers/regulator/palmas-regulator.c:1597:36: warning: Value stored to 'pdata' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20231111195330.338324-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 7993d3a commit 1fc2e76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/palmas-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ static const struct of_device_id of_palmas_match_tbl[] = {
15941594
static int palmas_regulators_probe(struct platform_device *pdev)
15951595
{
15961596
struct palmas *palmas = dev_get_drvdata(pdev->dev.parent);
1597-
struct palmas_pmic_platform_data *pdata = dev_get_platdata(&pdev->dev);
1597+
struct palmas_pmic_platform_data *pdata;
15981598
struct device_node *node = pdev->dev.of_node;
15991599
struct palmas_pmic_driver_data *driver_data;
16001600
struct regulator_config config = { };

0 commit comments

Comments
 (0)