From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E28D7C433F5 for ; Wed, 18 May 2022 17:23:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240847AbiERRXM (ORCPT ); Wed, 18 May 2022 13:23:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240964AbiERRXL (ORCPT ); Wed, 18 May 2022 13:23:11 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65354ABF68 for ; Wed, 18 May 2022 10:23:09 -0700 (PDT) Received: from fraeml708-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4L3KZ96tFnz6FGQ7; Thu, 19 May 2022 01:22:57 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml708-chm.china.huawei.com (10.206.15.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 18 May 2022 19:23:07 +0200 Received: from localhost (10.202.226.42) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 18 May 2022 18:23:07 +0100 Date: Wed, 18 May 2022 18:23:05 +0100 From: Jonathan Cameron To: Dan Williams CC: , , , , Subject: Re: [PATCH 04/14] cxl/mem: Fix cxl_mem_probe() error exit Message-ID: <20220518182305.00003d62@Huawei.com> In-Reply-To: <165237927776.3832067.18030972182050637940.stgit@dwillia2-desk3.amr.corp.intel.com> References: <165237925642.3832067.15995008431029494571.stgit@dwillia2-desk3.amr.corp.intel.com> <165237927776.3832067.18030972182050637940.stgit@dwillia2-desk3.amr.corp.intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.42] X-ClientProxiedBy: lhreml753-chm.china.huawei.com (10.201.108.203) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Thu, 12 May 2022 11:14:37 -0700 Dan Williams wrote: > The addition of cxl_mem_active() broke error exit scenarios for > cxl_mem_probe(). Return early rather than proceed with disabling suspend. > > Fixes: 9ea4dcf49878 ("PM: CXL: Disable suspend") > Signed-off-by: Dan Williams With or without rename of label Reviewed-by: Jonathan Cameron > --- > drivers/cxl/mem.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c > index 7622cfefa1b0..fed7f10ef9b2 100644 > --- a/drivers/cxl/mem.c > +++ b/drivers/cxl/mem.c > @@ -178,6 +178,8 @@ static int cxl_mem_probe(struct device *dev) > out: > device_unlock(&parent_port->dev); > put_device(&parent_port->dev); > + if (rc) > + return rc; > > /* > * The kernel may be operating out of CXL memory on this device, >