From patchwork Sun Feb 5 16:32:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9556197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 38D3060424 for ; Sun, 5 Feb 2017 16:34:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27F7C205FD for ; Sun, 5 Feb 2017 16:34:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17D4D262F0; Sun, 5 Feb 2017 16:34:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 18273205FD for ; Sun, 5 Feb 2017 16:34:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1caPlh-0006ug-PV; Sun, 05 Feb 2017 16:34:25 +0000 Received: from mail-pf0-f196.google.com ([209.85.192.196]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1caPld-0006V8-3c for linux-arm-kernel@lists.infradead.org; Sun, 05 Feb 2017 16:34:23 +0000 Received: by mail-pf0-f196.google.com with SMTP id y143so5150647pfb.1 for ; Sun, 05 Feb 2017 08:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TsSGMBDS+Nx7vLa0xg+nlGUx4IU2O87d/cHPjyjCLqI=; b=Wwz6547o65jvkUCNUYLEv3mkv1h/YrjJflS01hg+GTzua5CrRnBYk4+HC20UY6KULY xexE1VgrkPX2JwFIarT1vEVpku5bDHb1iWUB9yQKTzCCaFMGAXPzEtixkBFTxLp5vPIT lhhF46m87vuXLAvo0UM38QBYEWZfWpsh2PdGdAAqz77amSSZgi6zQNjzK17oNBPvcItt 2hCD3v2hldFbaxstS3aNNcXUYFHMejvH7j/EaYijg/3ZuJsFB0uzDew11yvBquxKyoLM L6R2Rtrx0GegD9n2fMeGpEkvb10Z5gkIkIACu+baqbPtJ+HJOxUL3lVCGGs8/+sT3CT4 n1Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TsSGMBDS+Nx7vLa0xg+nlGUx4IU2O87d/cHPjyjCLqI=; b=juR26NwXAOzSGDO8YnmgvvEtbNvC89hYkpma5JkCk6S/y6Ui1+BJH+ft+duhAEvZKZ uPxE+DYypq0JbZNXfngKUtq3vogZkHcxcQxSIc0nArwgo1FSEv9YU8F/RfKhVEAO8z2+ f8uUdDZ98oEHNWjwgQZY5N/DUGw0aPtk0hSMJf1Fv+pSoVSUnILGT+b3oaIpDWRlqMm8 nYAiGujHJC4EFkSylAkKd0dSGKa7auq33esiPJMgZiK4R2Qb98o1WcQUzKXfEifdtxJu gJCGLlqOLtPI4pWRzqW310CeKW1su2SHOZ/JeA8OHjURHKszG1E2KBWkfoi1XIzZvi2H VVYg== X-Gm-Message-State: AIkVDXLUjzNrGsOirSCtlGYDwRsoYlrajjPCTtwYdAPTmBvYOwa8ihBX9h8id+nIAYbiPw== X-Received: by 10.99.108.74 with SMTP id h71mr8447340pgc.99.1486312379901; Sun, 05 Feb 2017 08:32:59 -0800 (PST) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id y23sm82304575pfi.66.2017.02.05.08.32.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Feb 2017 08:32:59 -0800 (PST) From: Wei Yongjun To: Wei Xu , Russell King 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170205_083421_186258_A1651E35 X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wei Yongjun , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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;