Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp979509pxb; Wed, 6 Apr 2022 05:55:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc/WbxOzMP0zvdWJydQsyRvAo3JXd1X6apsYwCSHLIJ3jY/aUmI+KLoXzhvkmiGMpWQ9FN X-Received: by 2002:a17:902:f787:b0:14f:43ba:55fc with SMTP id q7-20020a170902f78700b0014f43ba55fcmr8517368pln.3.1649249755532; Wed, 06 Apr 2022 05:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649249755; cv=none; d=google.com; s=arc-20160816; b=0SMjdtB0MUg6EbUBdXXq7Lvq2ibvjZJJMa6ApOb/gvGk3ForBNMvtzGQMKzCYgK2DG jsOGc92G5BVHpKZbSwEVK/Xw9y8VNuFeEjub6YKJJFJLEh+1wDuBdUYpOVv1jmHxod5r A1XRd9VyCcpXsrgiRvGPyDS1GkA2I6NUze7k/j9JzYCwZ+dKTJYoTbNC3ssc7rpRNIy2 P3L0ThHG1vaP8iAFm0DlS4I5cufw1YeXzgEx+2UNneDx5SEeiZQ9Upv/52/YD/dCbwby Cn7yheDGlAtHRlh/5zeAZIwcCV2aCTui55Kmzi2JrGyilzhXrDei5bguaBI3RmQJE+si Do3w== 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=ubvJKs7BMAvdyd0KrfJVgA0wRIyUbIEACtATrBLn+ESX1rL7QFF1Iy+20oMXTtXSJY ViMooD1DObWDebTzsUUD5fW3e3hxVcDpzw3S36Ww6ComvD9tsCqlJu1EqHoNFfkuq1w8 S6WPxYG3vgKhbM/sIuWLFfKRYr3ZHFrI0NPkf4luvVqAZcsGAhLUIbuI/mRKCVuXs0JR VFiutgeYBD0Nn6PygN5CF/aO/0L1y0gEvtocvb1pfx02Hksf9uDcy1zundvJZpEwDZAF ZFrAvUP1+9PkgxdSRaJEB2dnFOtGtl7d7EaEi8P/DT1b58lIRAZEyFTuE0xQ6zLIKxPX +u8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s2MpECMm; 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 k2-20020a63ff02000000b00383f92e1f96si15066505pgi.79.2022.04.06.05.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:55:55 -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=s2MpECMm; 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 E63FB62B9F4; Wed, 6 Apr 2022 03:04:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1838667AbiDFA4R (ORCPT + 99 others); Tue, 5 Apr 2022 20:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348433AbiDEJrm (ORCPT ); Tue, 5 Apr 2022 05:47:42 -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 D87A9B7FE; Tue, 5 Apr 2022 02:33:55 -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 A13F5B81C85; Tue, 5 Apr 2022 09:33:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7E37C385A2; Tue, 5 Apr 2022 09:33:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151232; bh=1IjPHnjIVZjOabLDm+ybTZPEAtPkmXIKYSb7izvV96I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s2MpECMm4DQqAtAEk3qAJE01nTRILpLYJ4F2fBdKlzEnF2CgY0Ctu7CaWVCyHnadd LVbXU9tMNiEQgWHDJMff4O1yRaxx9XMx2Ecrg4RN6xYn0eBTgXQ807WET3T2xSS7S1 LQRQtmDqhvnkq8vOCM5OksSz18TffKFc9UDu/K5Q= 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.15 342/913] memory: emif: Add check for setup_interrupts Date: Tue, 5 Apr 2022 09:23:24 +0200 Message-Id: <20220405070350.099195909@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 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