From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753998AbcBGSIu (ORCPT ); Sun, 7 Feb 2016 13:08:50 -0500 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:51660 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750749AbcBGSIs (ORCPT ); Sun, 7 Feb 2016 13:08:48 -0500 Date: Sun, 7 Feb 2016 20:08:46 +0200 From: Sakari Ailus To: Anton Protopopov Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: i2c/adp1653: probe: fix erroneous return value Message-ID: <20160207180845.GE32612@valkosipuli.retiisi.org.uk> References: <1454819252-6773-1-git-send-email-a.s.protopopov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454819252-6773-1-git-send-email-a.s.protopopov@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anton, On Sat, Feb 06, 2016 at 11:27:32PM -0500, Anton Protopopov wrote: > The adp1653_probe() function may return positive value EINVAL > which is obviously wrong. > > Signed-off-by: Anton Protopopov > --- > drivers/media/i2c/adp1653.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c > index 7e9cbf7..fb7ed73 100644 > --- a/drivers/media/i2c/adp1653.c > +++ b/drivers/media/i2c/adp1653.c > @@ -497,7 +497,7 @@ static int adp1653_probe(struct i2c_client *client, > if (!client->dev.platform_data) { > dev_err(&client->dev, > "Neither DT not platform data provided\n"); > - return EINVAL; > + return -EINVAL; > } > flash->platform_data = client->dev.platform_data; > } Thanks! Applied to my tree. -- Kind regards, Sakari Ailus e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk