aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/resources.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-09-12 00:54:56 +0100
committerMark Brown <broonie@kernel.org>2025-09-12 00:54:56 +0100
commit9ca01e9226dbbb523b49b4e583e1d522977b4fe6 (patch)
tree630b0bbaf8c27dfb24c42570ec6e399700a4e662 /net/atm/resources.c
parentspi: dt-bindings: samsung: Drop S3C2443 (diff)
parentMAINTAINERS: Add an entry for Amlogic spifc driver (diff)
downloadlinux-9ca01e9226dbbb523b49b4e583e1d522977b4fe6.tar.gz
linux-9ca01e9226dbbb523b49b4e583e1d522977b4fe6.zip
support for Amlogic SPI Flash Controller IP
Merge series from Xianwei Zhao <xianwei.zhao@amlogic.com>: This Flash Controller is derived by adding an SPI path to the original raw NAND controller. This controller supports two modes: raw mode and SPI mode. The raw mode has already been implemented in the community (drivers/mtd/nand/raw/meson_nand.c). This submission supports the SPI mode. Add the drivers and bindings corresponding to the SPI Flash Controller.
Diffstat (limited to 'net/atm/resources.c')
-rw-r--r--net/atm/resources.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/atm/resources.c b/net/atm/resources.c
index b19d851e1f44..7c6fdedbcf4e 100644
--- a/net/atm/resources.c
+++ b/net/atm/resources.c
@@ -112,7 +112,9 @@ struct atm_dev *atm_dev_register(const char *type, struct device *parent,
if (atm_proc_dev_register(dev) < 0) {
pr_err("atm_proc_dev_register failed for dev %s\n", type);
- goto out_fail;
+ mutex_unlock(&atm_dev_mutex);
+ kfree(dev);
+ return NULL;
}
if (atm_register_sysfs(dev, parent) < 0) {
@@ -128,7 +130,7 @@ out:
return dev;
out_fail:
- kfree(dev);
+ put_device(&dev->class_dev);
dev = NULL;
goto out;
}