Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp605907pxb; Tue, 5 Apr 2022 15:44:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzW0isB9FtvXhK2YT9h59T6hhzCAiO9lzKDRYaBdHnpjKAZE2uHA+CzN97slFFR2jheuVtR X-Received: by 2002:a17:90a:bb0e:b0:1c7:e8bf:5561 with SMTP id u14-20020a17090abb0e00b001c7e8bf5561mr6550967pjr.18.1649198658081; Tue, 05 Apr 2022 15:44:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649198658; cv=none; d=google.com; s=arc-20160816; b=bdSHdgLxGov/COS0nGTXuGZ12WW2ja01qy+LB9vuyEforvyyeJtIWHFTskIZ4RbJPa 6Eic1a1ievc5ywh8ETvhB1n/rCwtMj8qZUS3/pt6C+6It8qnUYQ1DaFfpCOP7PEyadO/ TPMJh6B+Wae0lc4LeLJBsixVpiNlkqH0lrnr0t8FVaSk6H9VOR7zNlquO+S6CB25H+oU PBj7MSj9Qt41+1e/MJCjv/PsPBzKGfOW+m+B72SQjmgIRaOzga2SHYGhzbKqkNau4kCF uVUcYOM14fIWXGMx5x/jRzn5tpcoDV55FSOW69QwSDMAaBdkjJc0lr2wu/X+ElgyWoud LyQQ== 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=J2iTWR40ac9XIOIfw5SbmIzGuzsh35CRwBHWY0/zZVMkeQ42CmR/1ZoJrHDC1zlrUF 1+SGjnwie7//O7rDq9po04yXoPF5ZpffMvHoG/AeQPEMaqUEBnMpYlWkLpktfju2Div1 gGXfMTNNNchv4mav5jtbXBm6i/6FNvk0zA6L3dUc6rO5rvXZjXHAY+4CE0zVk7BoOxmk +MobRFiDxrHhwHt7wKrneOwgQEwZ2QCINJWIUqJjKj6SaT3joRv4lxuzQlCb/SIT2laB r5Vo9evO/DC33DUTMtA6aR4fdCjGig1of29mfbs9C8P4sHezlJ2WZhus9YU4y4MO8ADu 5bEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TCuuGVUn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l9-20020a170903244900b00156a405c568si7414085pls.231.2022.04.05.15.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:44:18 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TCuuGVUn; 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; 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 037AF78052; Tue, 5 Apr 2022 15:24:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358594AbiDEL4i (ORCPT + 99 others); Tue, 5 Apr 2022 07:56:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244953AbiDEIwu (ORCPT ); Tue, 5 Apr 2022 04:52:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA6F119C3F; Tue, 5 Apr 2022 01:47:35 -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 86A28614EB; Tue, 5 Apr 2022 08:47:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9645FC385A1; Tue, 5 Apr 2022 08:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148455; bh=1IjPHnjIVZjOabLDm+ybTZPEAtPkmXIKYSb7izvV96I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TCuuGVUnV40SAAQtmuf4QasxSHlRGsDlRkkGgI5q+vXk7vGgut/AokOCIkdfX1ADi AKukhsLGxsYyK04M37wRpd0CjSLrOlmc+k4Ocn09Y5L4/UhcCSokZ9rL0HYl3g+IRZ dlhmAqgjdMeAUwrOM/1bRojEnvjVO3cWX1oSVvuE= 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.16 0363/1017] memory: emif: Add check for setup_interrupts Date: Tue, 5 Apr 2022 09:21:16 +0200 Message-Id: <20220405070405.060427114@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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