Skip to content

Commit f1b3f90

Browse files
Sachin Kamatbroonie
authored andcommitted
regulator: fixed: Remove redundant error message
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
1 parent 84d0ffb commit f1b3f90

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎drivers/regulator/fixed.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
130130

131131
drvdata = devm_kzalloc(&pdev->dev, sizeof(struct fixed_voltage_data),
132132
GFP_KERNEL);
133-
if (drvdata == NULL) {
134-
dev_err(&pdev->dev, "Failed to allocate device data\n");
133+
if (!drvdata)
135134
return -ENOMEM;
136-
}
137135

138136
drvdata->desc.name = devm_kstrdup(&pdev->dev,
139137
config->supply_name,

0 commit comments

Comments
 (0)