Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp695582pxb; Tue, 5 Apr 2022 19:08:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJAnogQqSjfj6Cnb65kEyiB8cAbvipNXwPw8F0cXTiIjbempjNX6P+xwd1USnT+1I6xJnT X-Received: by 2002:a17:907:7206:b0:6e6:d0b7:fd88 with SMTP id dr6-20020a170907720600b006e6d0b7fd88mr5998160ejc.121.1649210896505; Tue, 05 Apr 2022 19:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649210896; cv=none; d=google.com; s=arc-20160816; b=0PV68F8F9OcPhuNkpiu+kbd2NaFqqhr5+8c3IN7BuP5CcXrjp3Q0wqfV150AGUIwfo 0J/HJ91iQdsNNN2YDgPmqIIlyDCGOFlGWhjdC23uXQilBU126LuHFNlsg+g/OOUSxYp7 3afa8atmi4e9gHkqY9bmf4/Io95uLihvQoWS7VJQ4QxIr/p853cEeDdSDPZCluv3p4Fl QWr+vJ2e8lorEbcqSxu+OdaZe/Ec7ef+aWj25O/oxkAEC5vFzdIjYWkQvSGyLhNNncd3 QCydz4vMVdnOWsPj5fmIL+KLLrPMsZoIl9tu1lf8aOdzJo6zIAEHQ0lY3oyrRs2AQj2T jYpQ== 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=JLrjRipb16wWksvgVMRpENsmAvDrWokoh/cWg/y9a7s=; b=mUXd0rBSnyPGAC5FUE001jltqaokzhXwWRWehE3MyV8aDkATL10cBo6ql0jzWkKFgk S207UQng7TzRUAk+KpZqUQHeTXybr723lHw/G7ypWpCVCCadOb+9LQfyRpiYP6ufAjom hRRe3hSx/pebczhLadtt2PV6mN5/b2llD3HvWKxzDlPMcsJQKcRaknHhOjoCfiKhN9LQ B76EZpiCcA2s4eni7C+HgwpXosiXTIDMYIyn2iM15F44GvUN3KDhmYkkFe1xY2h4rwuN Am22v605aOHbhOqqh9MjXe7rhurkOYdlANORE8V5xcBf7ww/vkUht9eA/dTpXg8/7AOz uWcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GxHgD9Z4; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gj10-20020a170907740a00b006e7ef40a0e9si5363521ejc.165.2022.04.05.19.07.47; Tue, 05 Apr 2022 19:08:16 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=GxHgD9Z4; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350176AbiDEJ4B (ORCPT + 99 others); Tue, 5 Apr 2022 05:56:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238191AbiDEISo (ORCPT ); Tue, 5 Apr 2022 04:18:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 214EBB91B0; Tue, 5 Apr 2022 01: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 ams.source.kernel.org (Postfix) with ESMTPS id 5DD2AB81B90; Tue, 5 Apr 2022 08:08:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA315C385A1; Tue, 5 Apr 2022 08:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649146096; bh=fTO4FNgiYK0sHRgMdAu5LNK4LHTq4UV5MSEOC31Srdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GxHgD9Z4hOUyY+ieVjEZWwaWtJ6PLetAxnpTuyNC97DIHQdYadaKFLsqNq3LWjr8S o6Al6vO5Mu46k6HHaa0Fb0LpGKZ2PMw2cT3MgiZlabl1x8H2IF0tSAYo8uYj/sECYV zsWZSVPFB5msVZCKFFF3z1SwyIVCSSf7PrCu8fjk= 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.17 0642/1126] mfd: mc13xxx: Add check for mc13xxx_irq_request Date: Tue, 5 Apr 2022 09:23:09 +0200 Message-Id: <20220405070426.477724571@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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=-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 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 8a4f1d90dcfd..1000572761a8 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