Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2957135pxb; Mon, 18 Apr 2022 11:57:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymQ1GchJPg4VdPU2nTrukwWqb/vRNwEtDnN6zz/7Qfw3CHpAyjp1nk0T2SBjpzFUqSmEHV X-Received: by 2002:a63:224f:0:b0:399:4a1a:b01f with SMTP id t15-20020a63224f000000b003994a1ab01fmr11582204pgm.123.1650308238508; Mon, 18 Apr 2022 11:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650308238; cv=none; d=google.com; s=arc-20160816; b=DMa6CCeEL8IhRr4Tp1ESXLxEMgKCO3AGkif3aQ0xCVtknUuYiR2H8KWtCZPC97Fe7M 3Xzh5F9sAIOBGhnKyjAKNxiGBnZLD8T0iI6mXDIy/53d/Vi7gfYpcCBiRi6b91j68oRv 5/9BEXuTZfNHCNfCKpJFxltS0qefcgRJj1CqgmlGbw7kpy/n2kytT0tPj0iYgtgtIin9 o1SIujKdQgYxei45Ips6iWz+G/H/4NTCLUl3PoNtVXI9MYMeW8gEbRYyQU8w2jloSEPs N9HRk6i0TruUxM9bjhIa1f81nPNRWPhv+AgiF+/hcfI2jpPYL7vnSWt5oAouZIkBDZR8 H/Cg== 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=plYAfs67XV2Bt0eArUZhdW6SPS1EUpL0j8116Ou9Nds=; b=mx7nSXCX6AOWL74Ii5i1Rz+2Djx/mKvnmc26CQCn8cM09FVmZaybnKb3A+vqwHBtv0 xCdeu/upXiozcy6hdYVrYk3r1P0H1lpdplEk3GkcAA1sTGe3RXu//kGAkxslkv6Q2N+U 1p/kqHW/Ig02TzTv9x5mpUo4HWkTgUzldffbSfSAbZTVQKetMfIuVeDsUlZmWaWe0vG7 wz46gdGTFnGXu90Pp6Kj55+KVGJNXierKBIi3litUh468kBB/j8IEWPlkj8TFZizqGSf TR1+yXT9aEPU3v8oL0rZ23tbMWQsAUziS4Um8ORJViJu2G8XinjqY9IejLvV7dEQhGfL nZ3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rrIxQlEK; 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 u6-20020a656706000000b0039d3f493fb0si8548380pgf.851.2022.04.18.11.57.02; Mon, 18 Apr 2022 11:57:18 -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=rrIxQlEK; 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 S244753AbiDRNp3 (ORCPT + 99 others); Mon, 18 Apr 2022 09:45:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242584AbiDRNX0 (ORCPT ); Mon, 18 Apr 2022 09:23:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B29E53D1DA; Mon, 18 Apr 2022 05:52:45 -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 1F7E1B80E59; Mon, 18 Apr 2022 12:52:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 865F8C385A1; Mon, 18 Apr 2022 12:52:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286362; bh=WUAPkXaX+FIRxRV6F+q0jv1YQE4laA/FQC2MJMuYRH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rrIxQlEKXSMZ1yjmvZQHUo6a6gY2Hh02SdZrs9qMTvhf0fMMahvPdu4HfgE7fcHUq n4KmbigA40EYCOUdCLaYOYYHQW0A5B9t4b4oIRs+P45ps35nhEaUpkMe1ITU9dGEBe s+FsPLOXhzZhCwHQpNacUqNuhpxErJC3HPjFJkUg= 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 4.14 084/284] memory: emif: Add check for setup_interrupts Date: Mon, 18 Apr 2022 14:11:05 +0200 Message-Id: <20220418121213.074400308@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@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.7 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 88c32b8dc88a..ed6c5fcb136f 100644 --- a/drivers/memory/emif.c +++ b/drivers/memory/emif.c @@ -1517,7 +1517,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); @@ -1551,7 +1551,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