From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4F39C19F2A for ; Sun, 7 Aug 2022 14:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233827AbiHGOIU (ORCPT ); Sun, 7 Aug 2022 10:08:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233849AbiHGOIT (ORCPT ); Sun, 7 Aug 2022 10:08:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5519A460; Sun, 7 Aug 2022 07:08:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4DDE360EE7; Sun, 7 Aug 2022 14:08:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BAE0C433D7; Sun, 7 Aug 2022 14:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659881297; bh=vQJxMRNWo4+kR/062cQxsou4ml9ZapoIw81lPoLiEuw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e6de5Q3lpUx9P8TwlLfMtthooVNj6Uj2FuTy+WGn/b4PfsSxC/pldx7Zmo1Lg7PCc fCcSsiztTZTtW7sJ2Ne1nwPiLvtChtyXpzM1dGS7JP2/VpqEwo3vT9QB5JXkSmKDml nqJu2hS4hX+LtsmxBsCDCFZIL5mWjfDnOWIGabckVSGMvvvXt30kh+J3ymWt7/xrTV obFa4Njfq5WPwr+NkVrVishM3AGBjVTSFFoK/V7P5VIXFltzE3YdrnknB1xH3f9v+e ffy+cly0aYgHFMeSZXrkJE4kPbBfUfw7MtDGUbM0T53tc2fN3XKQqeXmEYUKh9N+11 YRRSsbnIOEHDQ== Date: Sun, 7 Aug 2022 15:18:36 +0100 From: Jonathan Cameron To: Christophe JAILLET Cc: Kevin Tsai , Lars-Peter Clausen , Linus Walleij , Cai Huoqing , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Jonathan Cameron , linux-iio@vger.kernel.org Subject: Re: [PATCH] iio: light: cm3605: Fix an error handling path in cm3605_probe() Message-ID: <20220807151836.5300af2b@jic23-huawei> In-Reply-To: <0e186de2c125b3e17476ebf9c54eae4a5d66f994.1659854238.git.christophe.jaillet@wanadoo.fr> References: <0e186de2c125b3e17476ebf9c54eae4a5d66f994.1659854238.git.christophe.jaillet@wanadoo.fr> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sun, 7 Aug 2022 08:37:43 +0200 Christophe JAILLET wrote: > The commit in Fixes also introduced a new error handling path which should > goto the existing error handling path. > Otherwise some resources leak. > > Fixes: 0d31d91e6145 ("iio: light: cm3605: Make use of the helper function dev_err_probe()") > Signed-off-by: Christophe JAILLET oops. Applied to the fixes-togreg branch of iio.git. I've just move that branch forwards to current char-misc-linus which includes Greg's pull requests for this cycle via Linus' tree, but may well rebase on rc1 once that's available. Thanks, Jonathan > --- > drivers/iio/light/cm3605.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/light/cm3605.c b/drivers/iio/light/cm3605.c > index c721b69d5095..0b30db77f78b 100644 > --- a/drivers/iio/light/cm3605.c > +++ b/drivers/iio/light/cm3605.c > @@ -226,8 +226,10 @@ static int cm3605_probe(struct platform_device *pdev) > } > > irq = platform_get_irq(pdev, 0); > - if (irq < 0) > - return dev_err_probe(dev, irq, "failed to get irq\n"); > + if (irq < 0) { > + ret = dev_err_probe(dev, irq, "failed to get irq\n"); > + goto out_disable_aset; > + } > > ret = devm_request_threaded_irq(dev, irq, cm3605_prox_irq, > NULL, 0, "cm3605", indio_dev);