Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4754b421 authored by Sachin Kamat's avatar Sachin Kamat Committed by Mark Brown
Browse files

regulator: s5m8767: Remove redundant error message



kzalloc prints its own OOM message upon failure.

Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 3471c122
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -612,19 +612,13 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,

	rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata) *
				pdata->num_regulators, GFP_KERNEL);
	if (!rdata) {
		dev_err(iodev->dev,
			"could not allocate memory for regulator data\n");
	if (!rdata)
		return -ENOMEM;
	}

	rmode = devm_kzalloc(&pdev->dev, sizeof(*rmode) *
				pdata->num_regulators, GFP_KERNEL);
	if (!rmode) {
		dev_err(iodev->dev,
			"could not allocate memory for regulator mode\n");
	if (!rmode)
		return -ENOMEM;
	}

	pdata->regulators = rdata;
	pdata->opmode = rmode;