From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753532AbdJaPBv (ORCPT ); Tue, 31 Oct 2017 11:01:51 -0400 Received: from trinity.fluff.org ([89.16.178.74]:49491 "EHLO trinity.fluff.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751446AbdJaPBt (ORCPT ); Tue, 31 Oct 2017 11:01:49 -0400 X-Greylist: delayed 1488 seconds by postgrey-1.27 at vger.kernel.org; Tue, 31 Oct 2017 11:01:48 EDT Date: Tue, 31 Oct 2017 14:36:50 +0000 From: Ben Dooks To: Dan Carpenter Cc: SF Markus Elfring , Ben Dooks , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , Kukjin Kim , Wolfram Sang , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] I2C-S3C2410: Use common error handling code in s3c24xx_i2c_probe() Message-ID: <20171031143650.GA13049@trinity.fluff.org> References: <32c82282-ee0a-137f-4913-310b194b60f3@users.sourceforge.net> <20171025132620.l7scp2eachnarpzt@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171025132620.l7scp2eachnarpzt@mwanda> X-Disclaimer: These are my views alone. X-URL: http://www.fluff.org/ User-Agent: Mutt/1.5.20 (2009-06-14) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ben@trinity.fluff.org X-SA-Exim-Scanned: No (on trinity.fluff.org); SAEximRunCond expanded to false X-Clacks-Overhead: "GNU Terry Pratchett" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 25, 2017 at 04:26:20PM +0300, Dan Carpenter wrote: > > @@ -1180,24 +1179,21 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) > > i2c->irq = ret = platform_get_irq(pdev, 0); > > if (ret <= 0) { > > Not related to this patch, but the comparison here should be < 0. Or > otherwise we should set an error code. The bug was introduced in commit > e0d1ec97853f ("i2c-s3c2410: Change IRQ to be plain integer."). > > > dev_err(&pdev->dev, "cannot find IRQ\n"); > > - clk_unprepare(i2c->clk); > > - return ret; > > regards, > dan carpenter I believe (ret < 0) { } should be the correct case here. -- Ben Dooks, ben@fluff.org, http://www.fluff.org/ben/ Large Hadron Colada: A large Pina Colada that makes the universe disappear.