From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbdAXCFV (ORCPT ); Mon, 23 Jan 2017 21:05:21 -0500 Received: from forward4h.cmail.yandex.net ([87.250.230.101]:53548 "EHLO forward4h.cmail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750710AbdAXCFU (ORCPT ); Mon, 23 Jan 2017 21:05:20 -0500 X-Greylist: delayed 328 seconds by postgrey-1.27 at vger.kernel.org; Mon, 23 Jan 2017 21:05:19 EST Authentication-Results: mxback4g.mail.yandex.net; dkim=pass header.i=@yandex.ru From: Evgeniy Polyakov Envelope-From: drustafa@yandex.ru To: Christophe JAILLET Cc: "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" In-Reply-To: <20170109001300.3483-1-christophe.jaillet@wanadoo.fr> References: <20170109001300.3483-1-christophe.jaillet@wanadoo.fr> Subject: Re: [PATCH] w1: omap_hdq: Free resources on error path MIME-Version: 1.0 Message-Id: <831651485223409@web7g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 24 Jan 2017 05:03:29 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christophe 09.01.2017, 03:13, "Christophe JAILLET" : > In case of error returned by '_omap_hdq_reset()', free resources as done > elsewhere in this function. > > This patch slighly changes the semantic of the code. It now propagates the > error code returned by '_omap_hdq_reset()' instead of returning -EINVAL > unconditionally. > > Signed-off-by: Christophe JAILLET Looks good to me. If kernel-janitors@ will not push it upstream feel free to send to to GregKH and add me to copy. Acked-by: Evgeniy Polyakov > --- >  drivers/w1/masters/omap_hdq.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c > index bb09de633939..fb190c259607 100644 > --- a/drivers/w1/masters/omap_hdq.c > +++ b/drivers/w1/masters/omap_hdq.c > @@ -715,7 +715,7 @@ static int omap_hdq_probe(struct platform_device *pdev) >          ret = _omap_hdq_reset(hdq_data); >          if (ret) { >                  dev_dbg(&pdev->dev, "reset failed\n"); > - return -EINVAL; > + goto err_irq; >          } > >          rev = hdq_reg_in(hdq_data, OMAP_HDQ_REVISION); > -- > 2.9.3