Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp974001pxb; Wed, 6 Apr 2022 05:46:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc1sDlmvzgR4a8dA6K5oTZvrKAQNXFaw3Js4dh0lzWAzSu6GMIwUbyjikjDe4eu1OIiCgY X-Received: by 2002:a17:90b:3c0d:b0:1c7:ecae:e609 with SMTP id pb13-20020a17090b3c0d00b001c7ecaee609mr9592440pjb.61.1649249174906; Wed, 06 Apr 2022 05:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649249174; cv=none; d=google.com; s=arc-20160816; b=uqYSpsKvH9LGWHnP+XzLM3zH1Sd6+yLcUm/G79XjX56t/YeyZfKwS+odBHiBFMBOYz Sha7jes7RilT0Th158XnicHM4OSOY7ZvdEo0AJ8Gu/BGrg9dTHJkspLJVb5V6l1IG4sm dW82cltkVbC10JUcoeo7jRVa3MIGmBAD/7KRpToMesvxGU8RBlOUYdXmM7v8V4NTEKOQ QiFZUUJ1zNdvYEKFwcsoNeWRwuj7h75RKiCCWAv9nKnzdiWsRIZd5tFyrSLhE+NRd3hA O6FdJiJpeCZXYhtXDsvFRHGjplIZo49psNbGDVriSRxGm1trEAgzFGOTahLEpt/06jAd jBcw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1xSxFTj2nG3j6fi36u1s1mFJS1gAMBqC9MzNadzpveE=; b=z9rylG+2fDwH48OR+sVmuwF6zy6FoyPVPC6ys9SITikwFDySAO1JoSOn5U/a7nDhCd 4KDBzq4CrNYI5snHFyC6bBrCiLFpXrCuLT3NtqtuHiwAk5QLoEbFUSOdz/3kuw9uN8aN P2uPOhRWSTSseb8a6N0Tm7klj15zaJh1UT96s6kQshWYTTLEVAdROi5G2gDPFSmbx2wi EFWBROtPHZlZ569uVhzWp9RsVD9hdOVCFQBpkN4VKsgLvJUA/JYQunJ/fCaYwgX6qmXL M+N3548Z+g3+JuUrAekZzKCAFDKizfWOfVluitSSoMZw8NkmON4ua4wDTIs2eJGbklpG MNmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zW+kGawf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z6-20020a170902ccc600b00153b2d164f6si15476688ple.254.2022.04.06.05.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zW+kGawf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B2C11478A7D; Wed, 6 Apr 2022 02:25:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1450979AbiDEW32 (ORCPT + 99 others); Tue, 5 Apr 2022 18:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349444AbiDEJtw (ORCPT ); Tue, 5 Apr 2022 05:49:52 -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 E9DFF26AE2; Tue, 5 Apr 2022 02:46:02 -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 88BF261368; Tue, 5 Apr 2022 09:46:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9535DC385A1; Tue, 5 Apr 2022 09:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151962; bh=LyU0UCjIMK28Y/+3dy2ewi5N3bhvr2nkJBhF+Msbu9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zW+kGawfPQpxI7jhp5XoM4Ut+8anmAbUWstN3lA42xNcrgJouIYGgoNyuFykwPEMp ybPlcc2UZ/Eygx6MP6epByvJqbNH8zJjA2MI91akGlOgzCe68MyBZB56tuunAn/ctv RZNExar+TX68WRNNTJ1eUFvd6XAwts0Agpbq0oF8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiasheng Jiang , Jonathan Cameron , Sasha Levin Subject: [PATCH 5.15 604/913] iio: adc: Add check for devm_request_threaded_irq Date: Tue, 5 Apr 2022 09:27:46 +0200 Message-Id: <20220405070357.945319330@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Jiasheng Jiang [ Upstream commit b30537a4cedcacf0ade2f33ebb7610178ed1e7d7 ] 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 Link: https://lore.kernel.org/r/20220224062849.3280966-1-jiasheng@iscas.ac.cn Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- 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 c6416ad795ca..256177b15c51 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) { -- 2.34.1