Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9089208pxu; Mon, 28 Dec 2020 06:22:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJym53p1avNoX+ln+AeYnLjg8QOC8bq9YLPzbMCFCUCynL+wDeWVQi+mjl63N5iiKjYu/RLS X-Received: by 2002:a17:906:f9da:: with SMTP id lj26mr40815173ejb.467.1609165330628; Mon, 28 Dec 2020 06:22:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165330; cv=none; d=google.com; s=arc-20160816; b=0qbVg4DAj8TpD+wXcHLkyxkX27/IWtfLULV5rvowx/B1oMLA6Gypf9rka2QSW+NVew dC8oiHdIoaMwRYT+FKwFtU79ryTiHLJqPdFEqxaCvxV5gCUZTiliV2BjJZVtRet+gouf cHqJJLxMW+b5xJJiy5KDz4cnBVez0XW68/rHJAnoyUA5BX57hImG7ix3OBiKZy2tv/X6 XXQsMAq/wdp3sQQcYxIi9AURhJPd0jVzi0uOBW58qatoWqCoWZWAm2UBuLPXCOCT1F5B N+V5tKZ07lfLWPiDq14I+WuuEMM5MDAu3QDJv2xTbTHwhdrv0+h9rnukse45qNFunkmC eGlg== 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=BcOY11kB/sOcgEaKA8fnVY/TJbQvAH3NGyQkrn4LviQ=; b=qol+LGrXEC08+ZgKkNb+O8vATFJ/A6dM+bdSvhtsQBbdhKkFjkw1npYPU8Zi+tmsbY cP7CffVeI3SOKiXgYi8OCHZmP9Rm9duIq16W3E818RGEYPDCs0UPAf8M1ZNhzbQT7uam f8maqybl8AQ+zqwbLoDp0idlrm26OZ6HGi7UPR1J4N/ushBuceBMHRkiGu7wZ6usURmL ORQZnWHzHD0jut011p9rlBI7wv+Zv2ouHvYHOG0CTFE/LdT92/7kwSCUc6EzJtUFmVeM r+stkn94/zuugovteDlQpRszgQeNsRPM1kR3kuRqXzdSOBjgXGpL7ag4T2tVQNQujLML 4C1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XlNExq8B; 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 c25si22009994edx.588.2020.12.28.06.21.47; Mon, 28 Dec 2020 06:22: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=XlNExq8B; 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 S2441609AbgL1OTP (ORCPT + 99 others); Mon, 28 Dec 2020 09:19:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:54352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441594AbgL1OTL (ORCPT ); Mon, 28 Dec 2020 09:19:11 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 96A8020791; Mon, 28 Dec 2020 14:18:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165105; bh=Kb6FM557K7LQCJDekFluo1OE78MT6aUs15VIRAGVmlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XlNExq8B7Koos5LzTCMIN/VQUvVW0si8/V+rOpr2JHSslL+KeG7X7aoECQByhUmNN qSfGDEEYXkHrrqUGNrGW2JU/4sP2DPFk4ZN+e4zCUTSm9uCpHg7YfE8GYiPRAfJFa9 uvaQ8GLa7L5xQ0cYmEBzriq0cHsb+/70ZfObESYg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurentiu Tudor , Sasha Levin Subject: [PATCH 5.10 383/717] bus: fsl-mc: add back accidentally dropped error check Date: Mon, 28 Dec 2020 13:46:21 +0100 Message-Id: <20201228125039.353044302@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Laurentiu Tudor [ Upstream commit 61243c03dde238170001093a29716c2369e8358f ] A previous patch accidentally dropped an error check, so add it back. Fixes: aef85b56c3c1 ("bus: fsl-mc: MC control registers are not always available") Signed-off-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20201105153050.19662-1-laurentiu.tudor@nxp.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/bus/fsl-mc/fsl-mc-bus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 76a6ee505d33d..806766b1b45f6 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -967,8 +967,11 @@ static int fsl_mc_bus_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mc); plat_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (plat_res) + if (plat_res) { mc->fsl_mc_regs = devm_ioremap_resource(&pdev->dev, plat_res); + if (IS_ERR(mc->fsl_mc_regs)) + return PTR_ERR(mc->fsl_mc_regs); + } if (mc->fsl_mc_regs && IS_ENABLED(CONFIG_ACPI) && !dev_of_node(&pdev->dev)) { -- 2.27.0