diff options
| author | Takashi Iwai <tiwai@suse.de> | 2026-03-05 17:22:14 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-03-05 17:22:14 +0100 |
| commit | 8457669db968c98edb781892d73fa559e1efcbd4 (patch) | |
| tree | adcc5996b2cc6ceb3702421a77144531dd241217 /drivers/cxl/core/memdev.c | |
| parent | 3d543d9515928e4754a741c338dbcdf68ac47e39 (diff) | |
| parent | 325291b20f8a6f14b9c82edbf5d12e4e71f6adaa (diff) | |
| download | linux-next-8457669db968c98edb781892d73fa559e1efcbd4.tar.gz linux-next-8457669db968c98edb781892d73fa559e1efcbd4.zip | |
Merge tag 'asoc-fix-v7.0-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v7.0
A moderately large pile of fixes, though none of them are super major,
plus a few new quirks and device IDs.
Diffstat (limited to 'drivers/cxl/core/memdev.c')
| -rw-r--r-- | drivers/cxl/core/memdev.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c index f547d8ac34c7..273c22118d3d 100644 --- a/drivers/cxl/core/memdev.c +++ b/drivers/cxl/core/memdev.c @@ -1089,10 +1089,8 @@ static int cxlmd_add(struct cxl_memdev *cxlmd, struct cxl_dev_state *cxlds) DEFINE_FREE(put_cxlmd, struct cxl_memdev *, if (!IS_ERR_OR_NULL(_T)) put_device(&_T->dev)) -static struct cxl_memdev *cxl_memdev_autoremove(struct cxl_memdev *cxlmd) +static bool cxl_memdev_attach_failed(struct cxl_memdev *cxlmd) { - int rc; - /* * If @attach is provided fail if the driver is not attached upon * return. Note that failure here could be the result of a race to @@ -1100,7 +1098,14 @@ static struct cxl_memdev *cxl_memdev_autoremove(struct cxl_memdev *cxlmd) * succeeded and then cxl_mem unbound before the lock is acquired. */ guard(device)(&cxlmd->dev); - if (cxlmd->attach && !cxlmd->dev.driver) { + return (cxlmd->attach && !cxlmd->dev.driver); +} + +static struct cxl_memdev *cxl_memdev_autoremove(struct cxl_memdev *cxlmd) +{ + int rc; + + if (cxl_memdev_attach_failed(cxlmd)) { cxl_memdev_unregister(cxlmd); return ERR_PTR(-ENXIO); } |
