regulator: s5m8767: Remove redundant error message
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 20 Feb 2014 08:53:11 +0000 (14:23 +0530)
committerMark Brown <broonie@linaro.org>
Thu, 20 Feb 2014 11:49:06 +0000 (20:49 +0900)
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>
drivers/regulator/s5m8767.c

index 6850a25a41c4e754697bc9bdcb083f83717d2a8f..6884eb880dc9f33b56ef72d8eabd22cada499a3f 100644 (file)
@@ -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;