Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp921486pxb; Wed, 6 Apr 2022 04:21:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJvXrqkOIw4ycApzTbo1XfY/Y29k2uXjpjeFCE4EILhoSLy5TbqrxMLyiHXLPoeXkr9zwq X-Received: by 2002:a63:e617:0:b0:382:9ad9:d829 with SMTP id g23-20020a63e617000000b003829ad9d829mr6615737pgh.553.1649244071467; Wed, 06 Apr 2022 04:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649244071; cv=none; d=google.com; s=arc-20160816; b=S0OsUpfgiQS2sAOiKqo+zSNAHnNmjWJwdpYmj6s811fL/SYELWrYS3K2XMKSJcU4xv zsbzd6uEz2lvjJSCO+bgg5hQMYjsFHeh7LWZJtsDjhCpxQP0zaetUNhghAyNnnZ07odN avZDZlykTaaLR1JZm465dygOEjEwzD9eAbdNmPrqtVGSC8tLAxDT7qXpR5dymgNEJUUk H95Ljd/PHLFET99WXMAIjvQfuSNHDn46FVnbcAB5Q4bcvnW0tiN/3FsTT7Y+htdmWx+a 3o2iY2GPjQTkIORUmsI1S9w366eKaWh8SWahp2AJLnen6Bcrm+qKuYf8/yGzb4YmQL4g cnNg== 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=WqvGiaU7CMFhVJ7Pmf+FIHrah+RA2o5alfKtzWHK0vQ=; b=rBLwoOr85sHJ8l6t/q+b+psE5H5AKLXCAEDicu0ACC/BY2m7c/DrJbCES/gGRYZ34u V/vz3Gx1rqrQbMpb14EVL0I1Qoe6oFWS0LT5shFOO1v7Ungu+IMTYM/vE7kcDs3PQV6B FElhRy3bXTdOH1r16jptPOsVws2MW2qo7vX7fdQdE57//+Nnc5NPs5+4n6NB0Mv5PgJH kbp9KG43Ryzb8pp6Kfe+wF6vslyua4w73pSTNxF4uW9anMhFmDWFiraQoe9akOjyYQo+ Fwheds8GmCmfIZKjY2jTlA1PQlgVSZQMCHIHYCYGRYq+J1Kwfq3mL1+49ZOtHykJbaZ4 FJMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gaY3fsmd; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id gm9-20020a17090b100900b001c699f1f13asi4230345pjb.77.2022.04.06.04.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:21:11 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gaY3fsmd; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 EAA684DFBF4; Wed, 6 Apr 2022 02:42:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1837931AbiDFAtT (ORCPT + 99 others); Tue, 5 Apr 2022 20:49:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349183AbiDEJt1 (ORCPT ); Tue, 5 Apr 2022 05:49:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E15181FCD2; Tue, 5 Apr 2022 02:42:22 -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 7E13C615E5; Tue, 5 Apr 2022 09:42:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FDD6C385A1; Tue, 5 Apr 2022 09:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151741; bh=OujLyIAuJDB01DrksZ7hONiDI8cX9frFQiwTX/GwhKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gaY3fsmdoMimLTgO4srA14eK1GFs0kBxndgApGu1MmzG8W0P/ALsmXURfCsc/Rfuk q+5AqrTptg58uiBTeRvADe2CNyr38fNfx9ncv/vV2fIa+c1V+5Ae2iYoZHwDBLDXun UBE/kEmP9AsfLRjL65olvk7qtKbfj9KbqnaexraM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiasheng Jiang , Lee Jones , Sasha Levin Subject: [PATCH 5.15 524/913] mfd: mc13xxx: Add check for mc13xxx_irq_request Date: Tue, 5 Apr 2022 09:26:26 +0200 Message-Id: <20220405070355.559504001@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 e477e51a41cb5d6034f3c5ea85a71ad4613996b9 ] As the potential failure of the devm_request_threaded_irq(), it should be better to check the return value of the mc13xxx_irq_request() and return error if fails. Fixes: 8e00593557c3 ("mfd: Add mc13892 support to mc13xxx") Signed-off-by: Jiasheng Jiang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20220224022331.3208275-1-jiasheng@iscas.ac.cn Signed-off-by: Sasha Levin --- drivers/mfd/mc13xxx-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index 1abe7432aad8..e281a9202f11 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -323,8 +323,10 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode, adc1 |= MC13783_ADC1_ATOX; dev_dbg(mc13xxx->dev, "%s: request irq\n", __func__); - mc13xxx_irq_request(mc13xxx, MC13XXX_IRQ_ADCDONE, + ret = mc13xxx_irq_request(mc13xxx, MC13XXX_IRQ_ADCDONE, mc13xxx_handler_adcdone, __func__, &adcdone_data); + if (ret) + goto out; mc13xxx_reg_write(mc13xxx, MC13XXX_ADC0, adc0); mc13xxx_reg_write(mc13xxx, MC13XXX_ADC1, adc1); -- 2.34.1