From patchwork Tue Sep 29 11:01:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 291102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4601AC4727F for ; Tue, 29 Sep 2020 11:44:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF9722076A for ; Tue, 29 Sep 2020 11:44:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379845; bh=Q7PDz35zNEzU/WetldDS6SxJcYtRsWaGKywmCulC/WM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=iXFeAJBgitDoSFfNi8SrU2AzcPKt88+KTNhykpwItTzgDuXS5Wq/IO+EQf9NsB3yt +GULyifuNzxXFN6I4BDnMy+LIVYbA9a/WrpVp+0mz9fATtGCidyRKcOtPIOUhp4oJe NqnuZ2KcmxtS0yetruET1PxIGjeeYxuXSrf9IDhQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730837AbgI2LoE (ORCPT ); Tue, 29 Sep 2020 07:44:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:42652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730830AbgI2Ln6 (ORCPT ); Tue, 29 Sep 2020 07:43:58 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 33C00206E5; Tue, 29 Sep 2020 11:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379837; bh=Q7PDz35zNEzU/WetldDS6SxJcYtRsWaGKywmCulC/WM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=glEtBd0G39p42+t8IGPto4Qswq6XGRgnSDkUdScdUFGA1arHFMqlii42iDw5TnUs5 UxYYrj0BZz4kueoVVCdshF9sZS/Nt9LJswhWg87+m2tmIWyFYinGXJwI9ZlUDQIuYZ 5+hJL4zPj2Qp1odffgw9TPRfW++OBxybnvdpfr/4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Lezcano , Tianjia Zhang , Sasha Levin Subject: [PATCH 5.4 339/388] clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() Date: Tue, 29 Sep 2020 13:01:10 +0200 Message-Id: <20200929110026.872502814@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929110010.467764689@linuxfoundation.org> References: <20200929110010.467764689@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Tianjia Zhang [ Upstream commit 400d033f5a599120089b5f0c54d14d198499af5a ] In the init function, if the call to of_iomap() fails, the return value is ENXIO instead of -ENXIO. Change to the right negative errno. Fixes: 691f8f878290f ("clocksource/drivers/h8300_timer8: Convert init function to return error") Cc: Daniel Lezcano Signed-off-by: Tianjia Zhang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200802111541.5429-1-tianjia.zhang@linux.alibaba.com Signed-off-by: Sasha Levin --- drivers/clocksource/h8300_timer8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c index 1d740a8c42ab3..47114c2a7cb54 100644 --- a/drivers/clocksource/h8300_timer8.c +++ b/drivers/clocksource/h8300_timer8.c @@ -169,7 +169,7 @@ static int __init h8300_8timer_init(struct device_node *node) return PTR_ERR(clk); } - ret = ENXIO; + ret = -ENXIO; base = of_iomap(node, 0); if (!base) { pr_err("failed to map registers for clockevent\n");