From patchwork Tue Sep 29 11:01:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 262942 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 09A2BC47427 for ; Tue, 29 Sep 2020 12:35:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 99CD4208B8 for ; Tue, 29 Sep 2020 12:35:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601382919; bh=Q7PDz35zNEzU/WetldDS6SxJcYtRsWaGKywmCulC/WM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KcBCyksFeGGXNOC9YPVSS2oP3Bf9yA8k5Z7vLhPqhpOy5tgvWBlu84GwaWWrQoELf ywWu+0Nz0K8QQEoOPHfF6hliQQ6LBuAbuj6i48sOUBK4zPVIODoASmJktcav7z4tCR xvX7mXCuv8IaGJOiSX5fBfF7Y4PoMEuKLh6/7tfo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729296AbgI2MfT (ORCPT ); Tue, 29 Sep 2020 08:35:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729596AbgI2LVP (ORCPT ); Tue, 29 Sep 2020 07:21:15 -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 43B052083B; Tue, 29 Sep 2020 11:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601378349; bh=Q7PDz35zNEzU/WetldDS6SxJcYtRsWaGKywmCulC/WM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZTObzEV0sWbLbFGgaJWrFUTjzY6w9MxjLSOqCGWH7EhV0Rtpe0ndPLhmJTKJjtZRi +uuSYor813XfP++QDUPqMoVPgNfykoedRh9dkg+S4r7xQcOvogNMzzIEyWVzd2ZFdR kyWMKYRBz0LvU4m1VzjqZEG+dRGNVwdbpQc3M4HU= 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 4.14 148/166] clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() Date: Tue, 29 Sep 2020 13:01:00 +0200 Message-Id: <20200929105942.585481149@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105935.184737111@linuxfoundation.org> References: <20200929105935.184737111@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");