From mboxrd@z Thu Jan 1 00:00:00 1970 From: Belen Sarabia Subject: [PATCH] mailbox: rockchip: Delete redundant return value check of platform_get_resource() Date: Sat, 25 Mar 2017 16:56:18 +0100 Message-ID: <20170325155618.GA2806@belen-VirtualBox> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+glpar-linux-rockchip=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Jassi Brar , Heiko Stuebner Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-rockchip.vger.kernel.org Delete redundant error handling on the result to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Belen Sarabia --- drivers/mailbox/rockchip-mailbox.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/mailbox/rockchip-mailbox.c b/drivers/mailbox/rockchip-mailbox.c index d702a20..4dae133 100644 --- a/drivers/mailbox/rockchip-mailbox.c +++ b/drivers/mailbox/rockchip-mailbox.c @@ -205,9 +205,6 @@ static int rockchip_mbox_probe(struct platform_device *pdev) mb->mbox.txdone_irq = true; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - mb->mbox_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(mb->mbox_base)) return PTR_ERR(mb->mbox_base); -- 1.9.1