Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp676292pxb; Tue, 5 Apr 2022 18:19:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygTUsLWKV6CXPKZacoHGqXbcbCNtc2Lry2CG9y+rVuni9AV6zp2+9e/wx1PnzoX0zBuEhC X-Received: by 2002:a17:90a:9204:b0:1ca:8698:2470 with SMTP id m4-20020a17090a920400b001ca86982470mr7189436pjo.199.1649207998322; Tue, 05 Apr 2022 18:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649207998; cv=none; d=google.com; s=arc-20160816; b=WvAZhL0xdCcC8DANHuJyh0b4LFlRn69rSSzyszag00rsAaR7apL22Lquup9GdtyUK+ BW5ZcQqlkZES2GADnpGcg6oOQ01BdV3XX3p+5W3JYJ43DwzVAxlClFEBBH1lgTjQ8cq6 iOTQL4ZkOyMdzyQSds6IuYMlX1MEz9THWjr9DkZiDQZs6pfyiUNa5P5gSmYXQQCO0NfO qHy6iFRuwKhJVagJX97G4GZvqI9+Pi12LhZToH9FJeuoXCDHPUaH/Df0V8zG97t5/Ko7 mFaTkneW577vPTj4JUKv0PBAU3h6a93DKDbE6cCFd8x4RSMaL8ATvophmY2q8qTwwpM1 ArfA== 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=Vtri247E6A3R2dID0z298V7Qi0JdR9xV9qbg6GviS8s=; b=ueERvYE26+iTj/Vtlkxks+PA8lHQWKQeBoqRYcDrkW/Giiar1u3wwC6XiSWxlBIaRK XNpDj6+AkEcWOaeeOv2Zih9UXwFNLzgapnXze2aJfiZ1WaGtHqJb3WeQ1+zpReIPOb0N HxIGsOIXOKPtVe5RoBZPspujb8S8WxVul5d3b7wMN3t+Xl0acgr86FVBxkbDzChnS5iX AfzM/91txBohNBWrYvdmURQOpfMjDa7c6fyccYUkXqiq2B7zJRYExeWrYTXRO6OfpXmq t+EI2CcklN6MXAu7C+ybTU3lPtLtYgQ3E52pdfFGS9NPK3+8fh2Xq0Z0DdFPOGy+dXMU g2qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TzpoHyG6; 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 y13-20020aa7942d000000b004fa662b24c0si1530772pfo.330.2022.04.05.18.19.43; Tue, 05 Apr 2022 18:19:58 -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=TzpoHyG6; 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 S239665AbiDEIU0 (ORCPT + 99 others); Tue, 5 Apr 2022 04:20:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235721AbiDEIAJ (ORCPT ); Tue, 5 Apr 2022 04:00:09 -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 555521AF39; Tue, 5 Apr 2022 00:58:11 -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 E49C861725; Tue, 5 Apr 2022 07:58:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 013E1C340EE; Tue, 5 Apr 2022 07:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145490; bh=1IjPHnjIVZjOabLDm+ybTZPEAtPkmXIKYSb7izvV96I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TzpoHyG6FDuHbaNYNRXaGSvZ9mBa7hl4dsSCvwPHFyjy9bKteDThUiXt2Y4LeosXg NkxadVQykwEESvgS88YAyt5/93o1W1q/phCsgNnbr4S5gxPOys4FWiDQUtZRah2g4j iTmD9OGXZsOKO0AtZX0gX7A1SRDVxUqumey+y9uc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiasheng Jiang , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 5.17 0386/1126] memory: emif: Add check for setup_interrupts Date: Tue, 5 Apr 2022 09:18:53 +0200 Message-Id: <20220405070418.957508266@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 fd7bd80b46373887b390852f490f21b07e209498 ] 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 Link: https://lore.kernel.org/r/20220224025444.3256530-1-jiasheng@iscas.ac.cn Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin --- 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.34.1