Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3637759pxb; Mon, 24 Jan 2022 14:07:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhxHBIfEXCCWM+6aIbcDKnAVlaAHQGq0/4Fv5GAp5OLef2Q4xJ4xIxfmKERGDwpWAfb25n X-Received: by 2002:a17:902:b215:b0:149:936b:830b with SMTP id t21-20020a170902b21500b00149936b830bmr15687846plr.72.1643062030839; Mon, 24 Jan 2022 14:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643062030; cv=none; d=google.com; s=arc-20160816; b=KJZ1C1aEzBYiTiFguLgdCjS7Z36Tyjn9cKv4dBhm/GMMJ0cLZ3f7sZWszLDe7eFmLH rndyPFBzAYKVwJBL4XiRwe64Sif4t0XIQyebKE8kSEh4Ab5/KdXKXjVqISfEGNwHe3JU SdLrmAiWFI+g4Izg1u4U3Wppb8I0dnu4CBAiNRNVOO9LJYhPKkV9G0BUcziHSp2/hu9e MQgEDlHrbOgVV0gEtsjOWdacxwWkX/Bv4w6iGHdvV7XrQszh1/PqwYq/XCAcdXxH99dn e6rLsArxrgCzlOGej0pFCci14cWCXKJ8uiSGSZBNRb2AVD/VRiYT1ja09Je1y90ZJ+VH AupQ== 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=IoaIKfivmJsZVsoIYAm6trcgvGoK6RJiKISmpEIV8Eo=; b=wGs5BTzaTkmYvAbHR//KNTz4wdHa+9mkVATV1GlYtevFx2H0O46AYSYlk1pPJn/YRm BCAhAStQEn577x4Mw0xJIynyiqiZ9L/B4afUG1THpAKWtbCNoz40+6Sn5sTbjNmj8tdV pmqsVKW9qaHKeIlID3Vz4HZOerhp6heYDuWq5KhZpRJOjHybarPyV5tkwzYOTyWLKO2F xdhAY87i8WaTJhNHYhRd4M5NX60cjWw7e7pl5bkHIU9UWQEQuAaP4GrAFmu8am7kuN04 0Mig4fTsLTEF+DPBCkXEX2k+9tJ8xpInkP4fcMdW95pTLrfdn1DxDg1bWXhGqy/kd3NI LtIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PhkKARdB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si17361832plh.339.2022.01.24.14.06.57; Mon, 24 Jan 2022 14:07:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PhkKARdB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1576604AbiAXVzY (ORCPT + 99 others); Mon, 24 Jan 2022 16:55:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1450852AbiAXVVf (ORCPT ); Mon, 24 Jan 2022 16:21:35 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D671C0604DA; Mon, 24 Jan 2022 12:15:58 -0800 (PST) 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 C6029B8122A; Mon, 24 Jan 2022 20:15:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E035C340E5; Mon, 24 Jan 2022 20:15:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055356; bh=dLuDQRzMUeeFfFZdQZT99nYWumh4Iox5ujdhWHcDORI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PhkKARdBa1b58ssH2vlrAALeWe34wiCsHbEHduvmOgqPW8BYrQ5u52UGNd+8dm/Gy q6NY9TPgyhq3DZspRwxiHNfSv089vxOLc7DjWP4TreuX+AYLUiKXihl0AK+Juk+a1c TX6uMbXEURHzleFhji6NBMend6IkecG74Zy+o2HE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lad Prabhakar , Biju Das , Wolfram Sang , Geert Uytterhoeven , Krzysztof Kozlowski , Sasha Levin Subject: [PATCH 5.15 125/846] memory: renesas-rpc-if: Return error in case devm_ioremap_resource() fails Date: Mon, 24 Jan 2022 19:34:02 +0100 Message-Id: <20220124184105.287955195@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lad Prabhakar [ Upstream commit 818fdfa89baac77a8df5a2c30f4fb798cc937aa0 ] Make sure we return error in case devm_ioremap_resource() fails for dirmap resource. Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver") Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20211025205631.21151-6-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin --- drivers/memory/renesas-rpc-if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 77a011d5ff8c1..8618702233002 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -244,7 +244,7 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap"); rpc->dirmap = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(rpc->dirmap)) - rpc->dirmap = NULL; + return PTR_ERR(rpc->dirmap); rpc->size = resource_size(res); rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); -- 2.34.1