From: =?UTF-8?B?SmFudXN6IFXFvHlja2k=?= Subject: Re: [PATCH] gpio: mxs: implement get_direction callback Date: Mon, 17 Nov 2014 15:29:30 +0100 Message-ID: <546A064A.5060304@elproma.com.pl> References: <1416004026-9667-1-git-send-email-j.uzycki@elproma.com.pl> <20141114232601.GW27002@pengutronix.de> <5467A980.5090204@elproma.com.pl> <20141116214239.GX27002@pengutronix.de> <54693A51.5080907@elproma.com.pl> <54695654.3070209@elproma.com.pl> <20141117082848.GZ27002@pengutronix.de> <5469BBBD.30003@elproma.com.pl> <20141117095909.GH27002@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from v032797.home.net.pl ([89.161.177.31]:56905 "HELO v032797.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751772AbaKQO3Y (ORCPT ); Mon, 17 Nov 2014 09:29:24 -0500 In-Reply-To: Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Richard Genoud , =?UTF-8?B?VXdlIEtsZWluZS1L?= =?UTF-8?B?w7ZuaWc=?= Cc: Linus Walleij , Alexandre Courbot , fabio.estevam@freescale.com, Greg Kroah-Hartman , "linux-gpio@vger.kernel.org" , "linux-serial@vger.kernel.org" , Fabio Estevam , "linux-arm-kernel@lists.infradead.org" Hi Richard, W dniu 2014-11-17 o 11:05, Richard Genoud pisze: > 2014-11-17 10:59 GMT+01:00 Uwe Kleine-K=C3=B6nig : > > well, in this case, request_irq() will fail and all the previously > requested irqs will be freed: > /* > * If something went wrong, rollback. > */ > while (err && (--i >=3D 0)) > if (irq[i] >=3D 0) > free_irq(irq[i], port); I hesitate if use the rollback or just call mctrl_gpio_free_irqs(). Let's note that "i" is enum and the loop ends on i < 0. best regards Janusz -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html