Message ID | 165237927776.3832067.18030972182050637940.stgit@dwillia2-desk3.amr.corp.intel.com |
---|---|
State | Superseded |
Headers | show |
Series | cxl: Fix "mem_enable" handling | expand |
On Thu, 12 May 2022 11:14:37 -0700 Dan Williams <dan.j.williams@intel.com> 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 <dan.j.williams@intel.com> With or without rename of label Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > 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, >
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,
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 <dan.j.williams@intel.com> --- drivers/cxl/mem.c | 2 ++ 1 file changed, 2 insertions(+)