Re: [PATCH 5/7] mfd: pcf50633: Cleanup pcf50633_probe errorhandling

From: Samuel Ortiz
Date: Mon Oct 19 2009 - 11:06:23 EST


Hi Paul,

On Wed, Oct 14, 2009 at 02:12:34AM +0400, Paul Fertser wrote:
> From: Lars-Peter Clausen <lars@xxxxxxxxxx>
>
> Currently the child devices were not freed if the irq could not be requested.
> This patch restructures the function, that in case of an error all previously
> allocated resources are freed.
>
> Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
> Signed-off-by: Paul Fertser <fercerpav@xxxxxxxxx>
> ---
> drivers/mfd/pcf50633-core.c | 47 +++++++++++++++++++++++++-----------------
> 1 files changed, 28 insertions(+), 19 deletions(-)
[...]
> if (enable_irq_wake(client->irq) < 0)
> - dev_err(pcf->dev, "IRQ %u cannot be enabled as wake-up source"
> + dev_info(pcf->dev, "IRQ %u cannot be enabled as wake-up source"
> "in this hardware revision", client->irq);
2 things here: This doesnt really belong to this patch, and also I'd prefer to
keep that as an error message.


> ret = sysfs_create_group(&client->dev.kobj, &pcf_attr_group);
> if (ret)
> - dev_err(pcf->dev, "error creating sysfs entries\n");
> + dev_info(pcf->dev, "Failed to create sysfs entries\n");
Same here.

Otherwise, this patch looks good to me.



--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/