Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760874AbaGRIS0 (ORCPT ); Fri, 18 Jul 2014 04:18:26 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:60086 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759457AbaGRISW (ORCPT ); Fri, 18 Jul 2014 04:18:22 -0400 Date: Fri, 18 Jul 2014 09:18:15 +0100 From: Lee Jones To: Javier Martinez Canillas Cc: Mark Brown , Mike Turquette , Liam Girdwood , Alessandro Zummo , Kukjin Kim , Doug Anderson , Olof Johansson , Tomeu Vizoso , Krzysztof Kozlowski , Yadwinder Singh Brar , Tushar Behera , Andreas Farber , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 05/24] mfd: max77686: Return correct error when pdata isn't found Message-ID: <20140718081815.GO30888@lee--X1> References: <1404505467-26526-1-git-send-email-javier.martinez@collabora.co.uk> <1404505467-26526-6-git-send-email-javier.martinez@collabora.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1404505467-26526-6-git-send-email-javier.martinez@collabora.co.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 04 Jul 2014, Javier Martinez Canillas wrote: > When platform data is not found an -EIO (I/O error) code is returned. > This doesn't seem to be the correct error so better return -EINVAL > (Invalid argument) which is what most drivers do in this case. > > Signed-off-by: Javier Martinez Canillas > --- > drivers/mfd/max77686.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied now, thanks. > diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c > index 12d4c17..ada4976 100644 > --- a/drivers/mfd/max77686.c > +++ b/drivers/mfd/max77686.c > @@ -129,7 +129,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c, > > if (!pdata) { > dev_err(&i2c->dev, "No platform data found.\n"); > - return -EIO; > + return -EINVAL; > } > > max77686 = devm_kzalloc(&i2c->dev, -- 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/