Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3623685pxb; Mon, 24 Jan 2022 13:46:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/fGKwvWj+52Xwp6CJDgK9WlRCEXKZsIwSawrwgM3JDnUPOuSlUbyUpvjvU4jDieqI+896 X-Received: by 2002:a17:902:b586:b0:14b:6bab:55e3 with SMTP id a6-20020a170902b58600b0014b6bab55e3mr1890852pls.43.1643060780234; Mon, 24 Jan 2022 13:46:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643060780; cv=none; d=google.com; s=arc-20160816; b=AY/L42k8CF+d8AvLb6YbvmGZjVUnIwA1USICyrM75zZ1dNyxjT2TBlCvuksdKCkt/T dGWBKzOhfw0Pi6WOXWUjMsJ/nyMBEZuGrqBMlpZRMQ0pexq5fWJgOthTV/CiZiaA5qY+ ZHigdybrvvsTQa4SP8qfj+EvdT1ctSgdzi9xjtag8WeSv3Vn/GNwbY/dwCxt4XpRFPU+ MBN78iu1G9AX4Bx50depC0rw/eMSowXkCIdA0pzBs446Xx+pjhXt3ac8N8oqay2U9rhY thz674W2MEWSe3uB6xZYc1hqisnkJwT1x3r0R7ok8Sq4V85qzm7boC5cnpeROE1Bgc/t RWjQ== 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=C/uvxDdBl0VoYcTp4Fx2rEHYtjJ3PXq5DDJ5smKE+sc=; b=iBKxbrFPRbpHXRweLnVWS6afHoQEQJeR64mNi699kXXhUvUjfOBtSOtPe0bH432NzH y7LzB5BMfQlPFJzUmrbCwfyz71zjnO54eAOIratdquDN+9bLN3Ff9sQy5dMFNbmpl09E bJFtNGNQ7ehhGkWaYeU6g1shPibiYG0ZQM2RYU5OYmJ5KBMNstCcB2eC3s8FsKVMZWKe xYwBNiXGPAEsEGVyHFVfK9kxTZVfbcUokvfVKbY/CwpydcWKWCC0lX5+n5yCGQumUX1A OUhJjAU02pnH608tIKP0oCJ9SMg1yayxhloLlsXiDkV5QE3J1VO1gRPVolE4OmwThBhe oCYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q3Gaa+XJ; 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 kx1si451150pjb.157.2022.01.24.13.46.08; Mon, 24 Jan 2022 13:46:20 -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=q3Gaa+XJ; 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 S1452330AbiAXVYg (ORCPT + 99 others); Mon, 24 Jan 2022 16:24:36 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:52044 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443683AbiAXU6f (ORCPT ); Mon, 24 Jan 2022 15:58:35 -0500 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 AC9D7B812A7; Mon, 24 Jan 2022 20:58:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF58FC340E5; Mon, 24 Jan 2022 20:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057911; bh=UhT0JaI55mgQA7ptyJJ/KmDglLAZ1One7Pak05Uef7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q3Gaa+XJGqXrLntATQXF0kvSFAsT9tg6LuC6aWEf3YeLFqQZF/HasKWmMUWIj7Wqz dEZ1PlzdbATyFWzVYro3UQvXLQUMwtcKZSW/ScbMHeqx0qOhXEfVswwvOmn7p7Jgd4 pya/ylo8teOv+iQh12u3Ofgek/wbP/NG7l3/z3y8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lad Prabhakar , Vignesh Raghavendra , Biju Das , Wolfram Sang , Geert Uytterhoeven , Sasha Levin Subject: [PATCH 5.16 0118/1039] mtd: hyperbus: rpc-if: Check return value of rpcif_sw_init() Date: Mon, 24 Jan 2022 19:31:47 +0100 Message-Id: <20220124184129.107940134@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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 981387ed06b96908223a607f5fba6efa42728fc2 ] rpcif_sw_init() can fail so make sure we check the return value of it and on error exit rpcif_hb_probe() callback with error code. Fixes: 5de15b610f78 ("mtd: hyperbus: add Renesas RPC-IF driver") Signed-off-by: Lad Prabhakar Signed-off-by: Vignesh Raghavendra Reviewed-by: Biju Das Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20211025205631.21151-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Sasha Levin --- drivers/mtd/hyperbus/rpc-if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/hyperbus/rpc-if.c b/drivers/mtd/hyperbus/rpc-if.c index ecb050ba95cdf..367b0d72bf622 100644 --- a/drivers/mtd/hyperbus/rpc-if.c +++ b/drivers/mtd/hyperbus/rpc-if.c @@ -124,7 +124,9 @@ static int rpcif_hb_probe(struct platform_device *pdev) if (!hyperbus) return -ENOMEM; - rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent); + error = rpcif_sw_init(&hyperbus->rpc, pdev->dev.parent); + if (error) + return error; platform_set_drvdata(pdev, hyperbus); -- 2.34.1