From: Mark Brown Date: Mon, 3 Aug 2009 17:49:53 +0000 (+0100) Subject: regulator: More explict error reporting for fixed regulator X-Git-Tag: v2.6.32-rc1~164^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c53ad7fe5759cea10137c9e176d14f8c8f22d286;p=thirdparty%2Fkernel%2Flinux.git regulator: More explict error reporting for fixed regulator Signed-off-by: Mark Brown Signed-off-by: Liam Girdwood --- diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index cdc674fb46c33..9c7f956d57c48 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -70,12 +70,14 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev) drvdata = kzalloc(sizeof(struct fixed_voltage_data), GFP_KERNEL); if (drvdata == NULL) { + dev_err(&pdev->dev, "Failed to allocate device data\n"); ret = -ENOMEM; goto err; } drvdata->desc.name = kstrdup(config->supply_name, GFP_KERNEL); if (drvdata->desc.name == NULL) { + dev_err(&pdev->dev, "Failed to allocate supply name\n"); ret = -ENOMEM; goto err; } @@ -90,6 +92,7 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev) config->init_data, drvdata); if (IS_ERR(drvdata->dev)) { ret = PTR_ERR(drvdata->dev); + dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret); goto err_name; }