Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1319743pxm; Sat, 26 Feb 2022 11:40:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcD+nLAmnsu4Oib5CfJAO5pJL/hsjygQ8bcLRxnMDxt6a0DtRbfgqpjteCcPe2+q7D0wOu X-Received: by 2002:a05:6402:35c8:b0:410:dd43:3c09 with SMTP id z8-20020a05640235c800b00410dd433c09mr12492474edc.256.1645904412203; Sat, 26 Feb 2022 11:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645904412; cv=none; d=google.com; s=arc-20160816; b=bnbVre3EZW4oatzumrxnHt6ItoM5gFUdaySUiMRu2ZtEsgMNB6U2/QfyMYv8WaAPLK evd3mtGSKm8noK49z0xgaqqPKi+LYgstDCmpGi5kft+ZZpfhQgrJrJxM3kRCq/qf+NCh YWlhcYLjw5rVABWYcxq7fi6zPf6h4EuufwR56n8OOdGWjgDY2Gz1yx1RUSte8xQlcLpJ FRfKVqUwrXyzErqL7H6kuU7GKD7Wl/0KUdkr5em63FmTok8LoBTpNssXh2w3e9vBxhLI ui2xILPxdc3dlURYJmknVbrN6FedmKUhEYxfhAw7Y2cZISM/cVUvuRasrxA9cFCxCEdA tUUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=+tMMnt8PkolKX7goT/NectZG1LlgFWIEkFkElUCxnWM=; b=KrGNvVXlzfJHpIOs0jLq9/dEABDjsMJNxna6W92EcvVCLHPHhVv9lHFXWJkZ93aTB+ yxj9xm5PUQ1GHaKTHHszJlfzc33lHhlZqlhOeuBDh+HMXuqNQnzQvJ+mZ9bHidw7thBu SZFMqSmC4BpmrPzUCVbj91TNbQ2HGQ2mQiCgv7GxKSgaKkGqu+m1VJdmq/aOQyJzNHOH RQisvqd0jD+uNZptQBY8y3J3fTayVviR+s6EadVNaYPmfGhHuihLNUQtps/uQvANXxlW BCPrb9Z98gQMqxqlLkDm5M34+ODC6Ms9+hMXZwaCS3N081loButL+duqCUIyutI8n2XP 7wDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vGI6m8bU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw1-20020a056402228100b004132fa9bb35si3049909edb.4.2022.02.26.11.39.50; Sat, 26 Feb 2022 11:40:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vGI6m8bU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232624AbiBZSiZ (ORCPT + 99 others); Sat, 26 Feb 2022 13:38:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231907AbiBZSiY (ORCPT ); Sat, 26 Feb 2022 13:38:24 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75E8D793A1; Sat, 26 Feb 2022 10:37:49 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 2E1BFB807ED; Sat, 26 Feb 2022 18:37:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4122FC340E8; Sat, 26 Feb 2022 18:37:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645900666; bh=jHdv8TslOgixwk58VM7A8maJnFfS6HoZABigDdSO7is=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vGI6m8bUo5pHatGP6Isqpu2AmgwdATtD3oU6NxWFZ8pt1oetiAKuPyfDtcytcaYwC zOKthwY7fdGp+T74NhOAbX8AUndQObiP3IG85sGiGJdWKQIOXtibN8jdzhXwBjH+W3 QeuS7jFPcBxTL/pXdA0V2oUl+n1BGKCWAvhSMwrTcWvAGQ/seWrt1M3kge1EQTNScg xGkit97pEi2IE0e18i+xvd2uoxR+wlohP+j8PXRJnwo6/q/G2IcYdaMTt4r+someiL x5tYl5KORMaHwT7FAP93Upwhj7hNPkE3LR8kxGCUqYQKMWxqOZ+sBp/vBpYTjXdzMo I2qKylzQbkkBQ== Date: Sat, 26 Feb 2022 18:44:48 +0000 From: Jonathan Cameron To: Jiasheng Jiang Cc: lars@metafoo.de, tangbin@cmss.chinamobile.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: Add check for devm_request_threaded_irq Message-ID: <20220226184448.0a2a49b1@jic23-huawei> In-Reply-To: <20220224062849.3280966-1-jiasheng@iscas.ac.cn> References: <20220224062849.3280966-1-jiasheng@iscas.ac.cn> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Feb 2022 14:28:49 +0800 Jiasheng Jiang wrote: > As the potential failure of the devm_request_threaded_irq(), > it should be better to check the return value and return > error if fails. > > Fixes: fa659a40b80b ("iio: adc: twl6030-gpadc: Use devm_* API family") > Signed-off-by: Jiasheng Jiang Good find. That one has been there a long time so I'm not going to rush this in before the next merge window. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to see if we missed anything, Thanks, Jonathan > --- > drivers/iio/adc/twl6030-gpadc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c > index afdb59e0b526..d0223e39d59a 100644 > --- a/drivers/iio/adc/twl6030-gpadc.c > +++ b/drivers/iio/adc/twl6030-gpadc.c > @@ -911,6 +911,8 @@ static int twl6030_gpadc_probe(struct platform_device *pdev) > ret = devm_request_threaded_irq(dev, irq, NULL, > twl6030_gpadc_irq_handler, > IRQF_ONESHOT, "twl6030_gpadc", indio_dev); > + if (ret) > + return ret; > > ret = twl6030_gpadc_enable_irq(TWL6030_GPADC_RT_SW1_EOC_MASK); > if (ret < 0) {