From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752079AbdBEQdB (ORCPT ); Sun, 5 Feb 2017 11:33:01 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34900 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751442AbdBEQdA (ORCPT ); Sun, 5 Feb 2017 11:33:00 -0500 From: Wei Yongjun To: Wei Xu , Russell King Cc: Wei Yongjun , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH -next v2] ARM: hisi: fix error return code in hip04_smp_init() Date: Sun, 5 Feb 2017 16:32:55 +0000 Message-Id: <20170205163255.28589-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170122164128.29381-1-weiyj.lk@gmail.com> References: <20170122164128.29381-1-weiyj.lk@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun Fix to return error code -ENODEV from the of_find_compatible_node() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- v1 -> v2: fix file module --- arch/arm/mach-hisi/platmcpm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c index a6c1176..f0fff21 100644 --- a/arch/arm/mach-hisi/platmcpm.c +++ b/arch/arm/mach-hisi/platmcpm.c @@ -279,6 +279,8 @@ static int __init hip04_smp_init(void) &hip04_boot_method[0], 4); if (ret) goto err; + + ret = -ENODEV; np_sctl = of_find_compatible_node(NULL, NULL, "hisilicon,sysctrl"); if (!np_sctl) goto err;