From patchwork Tue Jun 17 14:30:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "jeff.liu" X-Patchwork-Id: 4366641 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A6AE09F1C4 for ; Tue, 17 Jun 2014 14:31:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C820E2025B for ; Tue, 17 Jun 2014 14:31:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F32B20138 for ; Tue, 17 Jun 2014 14:31:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932585AbaFQObM (ORCPT ); Tue, 17 Jun 2014 10:31:12 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:49812 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932410AbaFQObL (ORCPT ); Tue, 17 Jun 2014 10:31:11 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s5HEV2b1018686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 17 Jun 2014 14:31:03 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s5HEV2gL014543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 17 Jun 2014 14:31:02 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s5HEV1S2005965; Tue, 17 Jun 2014 14:31:01 GMT Received: from [192.168.1.101] (/27.194.216.145) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 17 Jun 2014 07:31:01 -0700 Message-ID: <53A05121.1040100@oracle.com> Date: Tue, 17 Jun 2014 22:30:57 +0800 From: Jeff Liu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: JBottomley@parallels.com, deller@gmx.de CC: linux-parisc@vger.kernel.org Subject: [PATCH 12/24] drivers/parisc: return actual error on pdc_stable_init X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jie Liu Return the actual error code than ENOMEM if call kset_create_and_add() failed at pdc_stable_init(). Cc: James E.J. Bottomley Cc: Helge Deller Signed-off-by: Jie Liu --- drivers/parisc/pdc_stable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 0f54ab6..3daca50 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c @@ -1065,8 +1065,8 @@ pdc_stable_init(void) /* register the paths kset as a child of the stable kset */ paths_kset = kset_create_and_add("paths", NULL, stable_kobj); - if (!paths_kset) { - rc = -ENOMEM; + if (IS_ERR(paths_kset)) { + rc = PTR_ERR(paths_kset); goto fail_ksetreg; }