Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1338588pxa; Sun, 2 Aug 2020 04:17:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzz9CnZUxoOUNX0zBf4Vsh25Fr/Ygye2nUYBlB/eOT0YBqd2q+Y9L1DRUlAxdGtIuDIGk6Z X-Received: by 2002:a17:906:b143:: with SMTP id bt3mr12641645ejb.134.1596367022195; Sun, 02 Aug 2020 04:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596367022; cv=none; d=google.com; s=arc-20160816; b=o/xK+mK8JVIEOLjSRo8LbKfBrmGS21NQJJahGzNm32mLHLbAc3CU3ZmpPkLKmsR+3U 6Sb9GsViKuT1UqzUUtJJv5CPTVs95yAuuFfI5OV5cI5NeCGe2Ot+z5D2/ctIO2lA16hP 7hdSTDCnCClKiAse++4Zcdb6KuubL90zY5Qy2zEFq5EMwD6yy8XWTwOPcefyxE+0Q8Ei Y0JjAn86WnQimh6g/gkACtMXOpKWzkFTdmNBP6gWtW06Kccz8ohPPwiJr/zg5n8dZHPG 6fIiZ34s6eHTvAOJUtcd4P/GqjXxTQWz3boS3o+vY0b79cy2r0CHLeO3JxVJXfF9I51J 8N2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Qc909ETKyDBaL3WK/iUmkiG++0jsYjrJu/5ydA5jfik=; b=fP452mJwzB3IgqUtnPbh3w0e6C6ch7BEALhe3rus2fEp8B9C0H4B4RK4kkxo3kYLwk XAmdyHxyQ/dRqR7e0DQsS3MIgoT+Shulqt6c6U9hN5ZylHRuF+KCZDSQ30okw883FS1d cRWo+R6KXbe0RkD5RB9F5yV3HO4gZCzWGDHTbr3FHu3JfFERdUWW4fcMKWixM0LdjvkK CXmhjEQlQ6BbJCTp/4EKuQOkBvsG1j6AxungveWz1qBjO+7Uta6x7voOkGgXLdM9qX8D Y3XPsCnyci88X9B6oDh/Kk8N8IdRdw3UfDdEf5PKMroLg5v3DsIdlWY+URusD3vs3E77 hY8g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cy23si2674854edb.311.2020.08.02.04.16.40; Sun, 02 Aug 2020 04:17:02 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728407AbgHBLQJ (ORCPT + 99 others); Sun, 2 Aug 2020 07:16:09 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:44809 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728270AbgHBLPq (ORCPT ); Sun, 2 Aug 2020 07:15:46 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07484;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0U4Tqfqu_1596366941; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0U4Tqfqu_1596366941) by smtp.aliyun-inc.com(127.0.0.1); Sun, 02 Aug 2020 19:15:42 +0800 From: Tianjia Zhang To: ysato@users.sourceforge.jp, daniel.lezcano@linaro.org, tglx@linutronix.de Cc: uclinux-h8-devel@lists.sourceforge.jp, linux-kernel@vger.kernel.org, tianjia.zhang@alibaba.com Subject: [PATCH] clocksource/h8300_timer8: Fix wrong return value in h8300_8timer_init() Date: Sun, 2 Aug 2020 19:15:41 +0800 Message-Id: <20200802111541.5429-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the case of calling of_iomap() failed, a positive value ENXIO is returned here. I think this is a typo error. It is necessary to return a negative error value. Fixes: 691f8f878290f ("clocksource/drivers/h8300_timer8: Convert init function to return error") Cc: Daniel Lezcano Signed-off-by: Tianjia Zhang --- 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 1d740a8c42ab..47114c2a7cb5 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"); -- 2.26.2