lkml.org 
[lkml]   [2013]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd: (max8997) Handle the potential error for mfd_add_devices
The $SUBJECT line does not conform to what's expected of MFD commits.

The $SUBJECT line is vague and you are missing a commit body.

Please read:
Documentation/SubmittingPatches

Specifically No2.

> Signed-off-by: Laszlo Papp <lpapp@kde.org>
> ---
> drivers/mfd/max8997.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
> index 791aea3..ace1a2b 100644
> --- a/drivers/mfd/max8997.c
> +++ b/drivers/mfd/max8997.c
> @@ -227,19 +227,19 @@ static int max8997_i2c_probe(struct i2c_client *i2c,
> pm_runtime_set_active(max8997->dev);
>
> max8997_irq_init(max8997);
> -

Why have you removed this line?

> - mfd_add_devices(max8997->dev, -1, max8997_devs,
> + ret = mfd_add_devices(max8997->dev, -1, max8997_devs,
> ARRAY_SIZE(max8997_devs),
> NULL, 0, NULL);
> + if (ret < 0) {
> + dev_err(max8997->dev, "cannot add mfd cells\n");

We're adding devices here, not cells.

"failed to add devices"

> + goto err_mfd;
> + }
>
> /*
> * TODO: enable others (flash, muic, rtc, battery, ...) and
> * check the return value
> */
>
> - if (ret < 0)
> - goto err_mfd;
> -
> /* MAX8997 has a power button input. */
> device_init_wakeup(max8997->dev, pdata->wakeup);
>

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-12-16 18:41    [W:0.068 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site