Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp568847pxb; Mon, 25 Oct 2021 13:59:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWZPgKA2FVOYhjmWKyvUj1DtcnoACkjuzRgnaZnQYxBvViZU7P7XEcmX4/SaXPA6QCTvtf X-Received: by 2002:a17:90b:224e:: with SMTP id hk14mr23721014pjb.224.1635195544650; Mon, 25 Oct 2021 13:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635195544; cv=none; d=google.com; s=arc-20160816; b=kAuZuQoJFT5gDkTZtdyoSAueB+YB1+JiGDY0EKzH4EfaTVOXej/Sa1L/J6H2bjvawa RgBInxNSlpaEnb0mYnJfwK1YZ4oLamf80qzjaM0SC8gXmzGOapeQQtlDsMpNToJrgnrt 2LjEsiR3xhgeD7CvoVt9T8PSDyxOuBAqIvt7eGt63qD/T8MourtHeGeTmVkR6TPVjMRz 9vgH6vEbjhsEyj7ahAiGeq0ay9FMLBiF38oJ9Mv76Ach1sjJP7v/ximbK7UYLFWrZYqn +ox03Nc4YoxXWnlM6WFqluBoCDAl7Sx4EfpLPAIyIexdtDikIVPUMDksBUkoE1dKB1Nh Afrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=9cj6YevaG1g+Gmg7etRgM+MdDHXma86qB0hFh8A3hsQ=; b=bWgKldP72QluVV6fvoSM0FVykZk2UiW1fOwFO6qjHCAj7tu/2sU1X8LxmJWQcu0g5R GvHZvPeZ1c1JD2WSsSPVAlHbbE0O0djqfEFfO0ryV/JuULrXwNmPkJosih30vcPjxjc3 iDoVeEK8tNpb5116RN/C2Adlx9z8YwvUBfK+JtflkiGBIsttToy40c1Rd7D4eiAFZGCd wXvVBVc8pqUvA4L5mAuS2ZoQewp9NtU0W9f8ozq9HjBxnt9G/0g6FijLPuLYkrIrJJWm gLaQ6Q+6DGZ1jrsRTCZiKVyBTCgYV/1t/17uDBtJo4hUe7L2QkHC2/6odCk4QiG30WY/ 0J2Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si32622603pfc.50.2021.10.25.13.58.52; Mon, 25 Oct 2021 13:59:04 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234844AbhJYU71 (ORCPT + 99 others); Mon, 25 Oct 2021 16:59:27 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:15799 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234697AbhJYU7X (ORCPT ); Mon, 25 Oct 2021 16:59:23 -0400 X-IronPort-AV: E=Sophos;i="5.87,181,1631545200"; d="scan'208";a="98142147" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 26 Oct 2021 05:56:59 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 0B1E841003BB; Tue, 26 Oct 2021 05:56:54 +0900 (JST) From: Lad Prabhakar To: Krzysztof Kozlowski , Rob Herring , Vignesh Raghavendra , Miquel Raynal , Richard Weinberger , Mark Brown , Philipp Zabel , Geert Uytterhoeven , Wolfram Sang , Sergei Shtylyov Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH v2 5/7] memory: renesas-rpc-if: Return error in case devm_ioremap_resource() fails Date: Mon, 25 Oct 2021 21:56:29 +0100 Message-Id: <20211025205631.21151-6-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211025205631.21151-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20211025205631.21151-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v1->v2: * New patch (split from patch 5 of v1) * Included RB tags --- 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 7435baad0007..ff8bcbccac63 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -243,7 +243,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.17.1