Received: by 2002:ac2:5a04:0:0:0:0:0 with SMTP id q4csp1078738lfn; Wed, 23 Feb 2022 18:31:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfaWMWrwz91xaNaaygeUYEiFyyEcCHK5Hl/xYn/PG0tNXvRpUOcgJOF26tugTgCnd5ESHj X-Received: by 2002:a63:2c53:0:b0:373:7234:adf2 with SMTP id s80-20020a632c53000000b003737234adf2mr602954pgs.111.1645669882183; Wed, 23 Feb 2022 18:31:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645669882; cv=none; d=google.com; s=arc-20160816; b=MIfbdCYDggk9Ihy8JA7MMSdwxkTkmLIB1cbf8dimxjko72bfC8ps+vFIwGqmA4nUp2 xBagXNQ9HkcIXQIPXwQHsTPmTxa/94w58cD0T3JjRVPfUBlBzNY+hUA70/deL/67ANkj Bg5wpEux6IeCgerkIOPHQI2om64Vjx6cFEsDr7LL5CIzG3xHDBp865HFB06uYKwTRFNW tkgESuM9ShAanwC+uvGUo/8FsE+QuDmlo9MnyBJSSo88ZOs/pZqh5kCejw6CeYvwWSRo 2R+/ezsDplUDjrG1pFx5vvbOPk00zLPJvHksXBMc9ypYu6lTAnSwZb/NoRkEpx5ESrMO hC0g== 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 :message-id:date:subject:cc:to:from; bh=8e5jm3gqJQpqDgNOrN9taHdwxk9J/fvRJL1NoHs6nqE=; b=v+yismzFehNNCqzHwKmlpcPdV1FocJE6Etr+D2ZHiWxRtC/1BPGPysAO1vxZuCtuYe UVd0F5r0HfeeKFbvdG0EZWzRJNTyaB+9xv73V/sps+XH6KsA0WWIToRCBUc2T4DJ13R1 R4da9WxhTWWNodVEFzWQxYbaN2N5/jyLqANVeqNsfIw8l4G/kL+ipwJhEtVECt26apmF OKWqEOvE+RYgpCbb2Gsd6n8xryLHdncW/wdB0UFam3EGzUpGQnA2UwWHZrYNtjiUwT3a qypScT8gcaTucOoPjwr6voqV8poNQy+0TlUr8aJudf9AnYaE0CaSkag/NkFBjUrFtz+t /+zQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e27si1267192pgm.286.2022.02.23.18.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 18:31:22 -0800 (PST) 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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 574F22335F3; Wed, 23 Feb 2022 18:31:20 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbiBXCbq (ORCPT + 99 others); Wed, 23 Feb 2022 21:31:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbiBXCbp (ORCPT ); Wed, 23 Feb 2022 21:31:45 -0500 X-Greylist: delayed 460 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 23 Feb 2022 18:31:15 PST Received: from cstnet.cn (smtp23.cstnet.cn [159.226.251.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 58A602325EF for ; Wed, 23 Feb 2022 18:31:15 -0800 (PST) Received: from localhost.localdomain (unknown [124.16.138.126]) by APP-03 (Coremail) with SMTP id rQCowADX35sk7BZi16QYAQ--.48527S2; Thu, 24 Feb 2022 10:23:33 +0800 (CST) From: Jiasheng Jiang To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: [PATCH] mfd: mc13xxx: Add check for mc13xxx_irq_request Date: Thu, 24 Feb 2022 10:23:31 +0800 Message-Id: <20220224022331.3208275-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: rQCowADX35sk7BZi16QYAQ--.48527S2 X-Coremail-Antispam: 1UD129KBjvdXoWrtF17urWrWFy3Cr17KrWkCrg_yoWkJrc_WF y5Xrn7WryUtr17Aw4vvFy3CrWFvr4Dur4Sg3WktFs3t3yUtF97XrnIq3s8Jr4rZrWDJFW3 JrnrAr4xZFnrtjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbckFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVWxJr 0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK67AK6r4U MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr 0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUXVWUAwCIc40Y0x0E wIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJV W8JwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI 42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUgVyxUUUUU= X-Originating-IP: [124.16.138.126] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 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 --- 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.25.1