Received: by 2002:ac2:5a04:0:0:0:0:0 with SMTP id q4csp1088061lfn; Wed, 23 Feb 2022 18:54:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKkUAZxTVrTRTHvnJ+iAywRtNAYar/L3zDmTYGqgfuy9GHFeheZ4B60TkX6TIxhmqituxR X-Received: by 2002:a17:902:f605:b0:14d:9e11:c864 with SMTP id n5-20020a170902f60500b0014d9e11c864mr847145plg.54.1645671298387; Wed, 23 Feb 2022 18:54:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645671298; cv=none; d=google.com; s=arc-20160816; b=NC0rgFY7qJtAPcMQ+VbKORDMLK7sAsiZwyl1uDGvUk5oYlmGyj9PRK+zhlakvV+dJI nFm/1ftVlJPhfezTdqN3WDbHDZFEjNTv2Jud88iCy/QkP1rHpEhPa9SRLVguIXIavo8v acrknCYuj8QmYOL5JGR6JX/z8iGjvD+Ia7cidxHEgiXrzV6zr3+3vJe3A2uKW6y2WGkV h5GJ3p9L2BA55ftPmDNe8BOlZ1AoQL2cKigTi0m0JNr9Rwd76tkO5jqA/ipC0FKMkyhv MM+GV8e09E0Z3sNuc80lrBToe/PhQ7Q/3oMZnGW2J+ZHk84N/95DKuLX/E18Y5MAAy4P uWxQ== 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=7f6TItEroDr9Tzg2BqASMfHchl4WSIL8Nd23tII5Fjo=; b=Ftog01JtxIwu7SeEXbGEQZ+zZ1hbUd/fiJqhW0uMMxZgvmEUYKjIZsV6HOladfmEOo H1ivsqOS3rSAhoPw1U31uSn+IbWerJ5m5lXaADukLh14ewhooBoOfcDc/7iuaym1zX09 dZAUuwe8v9J1t3VE6EHEUt2LnhMvCSLM8NNzNKVrBN9tBtXrN95Xaaa0F6DA/VH7JXMQ T0MLlLQe/OZXlNwjdlFLdFJ7wk3VqtaBo3RIp6SyqTwEgmy7u8kQRJV94j1MaDY5d8sx 6I13rf2C8L00qOVfSCiORD9t9gLY+z9AOViKMo/MX8bnQiLXUyqgNFQ1w12B1PRsYF1h TFWg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s2si1370845pgq.237.2022.02.23.18.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 18:54:58 -0800 (PST) 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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5D10B23A19F; Wed, 23 Feb 2022 18:54:56 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230198AbiBXCzW (ORCPT + 99 others); Wed, 23 Feb 2022 21:55:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230193AbiBXCzV (ORCPT ); Wed, 23 Feb 2022 21:55:21 -0500 Received: from cstnet.cn (smtp25.cstnet.cn [159.226.251.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B690F23A1BF for ; Wed, 23 Feb 2022 18:54:49 -0800 (PST) Received: from localhost.localdomain (unknown [124.16.138.126]) by APP-05 (Coremail) with SMTP id zQCowAC3vdl28xZiXGdgAQ--.18556S2; Thu, 24 Feb 2022 10:54:47 +0800 (CST) From: Jiasheng Jiang To: ssantosh@kernel.org, krzysztof.kozlowski@canonical.com Cc: linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: [PATCH] memory: emif: Add check for setup_interrupts Date: Thu, 24 Feb 2022 10:54:44 +0800 Message-Id: <20220224025444.3256530-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: zQCowAC3vdl28xZiXGdgAQ--.18556S2 X-Coremail-Antispam: 1UD129KBjvJXoWrtF1rCr4fCrWDtr1rXF48Xrb_yoW8Jr47pa 17WayqyrW8X34DGw48CFn0vF15Ka1rK3y7Was7C39a9F98tr1UZF95CFyjyrs5GFWkG3W5 JF4Fyw18uayUAr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkj14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxV WxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2Wl Yx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbV WUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l42xK82IYc2Ij 64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x 8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE 2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42 xK8VAvwI8IcIk0rVWrJr0_WFyUJwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv 6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUywZ7UUUUU= 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 setup_interrupts() and return error if fails. Fixes: 68b4aee35d1f ("memory: emif: add interrupt and temperature handling") Signed-off-by: Jiasheng Jiang --- drivers/memory/emif.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index 762d0c0f0716..d4d4044e05b3 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1117,7 +1117,7 @@ static int __init_or_module emif_probe(struct platform_device *pdev) { struct emif_data *emif; struct resource *res; - int irq; + int irq, ret; if (pdev->dev.of_node) emif = of_get_memory_device_details(pdev->dev.of_node, &pdev->dev); @@ -1147,7 +1147,9 @@ static int __init_or_module emif_probe(struct platform_device *pdev) emif_onetime_settings(emif); emif_debugfs_init(emif); disable_and_clear_all_interrupts(emif); - setup_interrupts(emif, irq); + ret = setup_interrupts(emif, irq); + if (ret) + goto error; /* One-time actions taken on probing the first device */ if (!emif1) { -- 2.25.1