Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp568261pxb; Mon, 25 Oct 2021 13:58:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVtJGJW9BqjNWWyuaoPI+PikSDUf33D9jMg7SInYZpwy77WJ4zb5lv2XzSqLQdqIXy/OVb X-Received: by 2002:a17:90b:1c81:: with SMTP id oo1mr23106230pjb.97.1635195489578; Mon, 25 Oct 2021 13:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635195489; cv=none; d=google.com; s=arc-20160816; b=Qm7nuAzg8h4Islbp920UIrqy7SS1uzXkI7bhJr/5YRmUkqyXhLAC7yopsFaQro+Dpa kAX1b4OTUWB1QSk2kUAR3MXqojHJEnu22yJVpRwchjiotb8bJIzpLljJShPT8vo8KRQc TT+9ASSSPrjJbnm2lUPijtjB2Rsj6cQsMvq+H/uqWTQrT7RgvC+jPvAGYbRz/fznA3jy v/EKEXE7Eq/NJbaLUt5Y6tJkMrOLWLTkdCwXW0F9Spwguaru3JYIMj4d5ZFGPz+5He+x J2nXZtmqHD7J7ZICF+PRMKNqbBjrpzTmqeU3eNQtAQFPvuxcCJmHhj4qcjmX18gG+0Lg z1zA== 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=hR4sKk1uaMFHwSC8pNyRmqI+PFGk64mUObKJYKzAzFQ=; b=tOBefTxSI5Y1uPUeX3C34tB5W/qYQzHWkQI0HxyoHZUYamCFJFXJEQmh5j5PbOEE0U eHJypJhBPBQ2LZFoMh3jk6/YcsY/oLHNfshbqlwK5QYFFhHIPkHZaoVxJNUV3722aGEz 8iKDZOITKrQvqxpEUIU2s6RlGS4xfVtc0TadBI7yAGkKLNcF8EIXyLrhNofW1r65meAS BZ1sAamqT/lb8zl18yjl5Xl4OiEiDkb4OJIoVUetqXLuPHIgB3/z4k3eqyoMIAIOSPkB UK4RRFUHWVarULdB3XEOx/kkJbEwJ9QWgLWC29xDoTb4vQW3mL/lDI6ePj5jnwsxrIA+ jQwA== 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 y4si29698283pfi.7.2021.10.25.13.57.57; Mon, 25 Oct 2021 13:58:09 -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 S234717AbhJYU7Q (ORCPT + 99 others); Mon, 25 Oct 2021 16:59:16 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:33583 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234594AbhJYU7O (ORCPT ); Mon, 25 Oct 2021 16:59:14 -0400 X-IronPort-AV: E=Sophos;i="5.87,181,1631545200"; d="scan'208";a="98385697" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 26 Oct 2021 05:56:50 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 1F4B441003BB; Tue, 26 Oct 2021 05:56:46 +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 3/7] spi: spi-rpc-if: Check return value of rpcif_sw_init() Date: Mon, 25 Oct 2021 21:56:27 +0100 Message-Id: <20211025205631.21151-4-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 rpcif_sw_init() can fail so make sure we check the return value of it and on error exit rpcif_spi_probe() callback with error code. Fixes: eb8d6d464a27 ("spi: add Renesas RPC-IF driver") Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven --- v1->v2: * Included RB tags --- drivers/spi/spi-rpc-if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-rpc-if.c b/drivers/spi/spi-rpc-if.c index c53138ce0030..83796a4ead34 100644 --- a/drivers/spi/spi-rpc-if.c +++ b/drivers/spi/spi-rpc-if.c @@ -139,7 +139,9 @@ static int rpcif_spi_probe(struct platform_device *pdev) return -ENOMEM; rpc = spi_controller_get_devdata(ctlr); - rpcif_sw_init(rpc, parent); + error = rpcif_sw_init(rpc, parent); + if (error) + return error; platform_set_drvdata(pdev, ctlr); -- 2.17.1