summaryrefslogtreecommitdiff
path: root/drivers/isdn/mISDN/core.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2022-12-09 22:52:17 +0300
committerJason Gunthorpe <jgg@nvidia.com>2022-12-09 22:52:17 +0300
commitd69e8c63fcbbf695ff7ff2c6d26efead23cfbb3a (patch)
tree4d714ecd331233069ab718989bb017dfd934e129 /drivers/isdn/mISDN/core.c
parent6cfe7bd0dfd33033683639039b5608d6534c19eb (diff)
parent76dcd734eca23168cb008912c0f69ff408905235 (diff)
downloadlinux-d69e8c63fcbbf695ff7ff2c6d26efead23cfbb3a.tar.xz
Merge tag 'v6.1-rc8' into rdma.git for-next
For dependencies in following patches Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/isdn/mISDN/core.c')
-rw-r--r--drivers/isdn/mISDN/core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c
index a41b4b264594..90ee56d07a6e 100644
--- a/drivers/isdn/mISDN/core.c
+++ b/drivers/isdn/mISDN/core.c
@@ -222,7 +222,7 @@ mISDN_register_device(struct mISDNdevice *dev,
err = get_free_devid();
if (err < 0)
- goto error1;
+ return err;
dev->id = err;
device_initialize(&dev->dev);
@@ -233,11 +233,12 @@ mISDN_register_device(struct mISDNdevice *dev,
if (debug & DEBUG_CORE)
printk(KERN_DEBUG "mISDN_register %s %d\n",
dev_name(&dev->dev), dev->id);
+ dev->dev.class = &mISDN_class;
+
err = create_stack(dev);
if (err)
goto error1;
- dev->dev.class = &mISDN_class;
dev->dev.platform_data = dev;
dev->dev.parent = parent;
dev_set_drvdata(&dev->dev, dev);
@@ -249,8 +250,8 @@ mISDN_register_device(struct mISDNdevice *dev,
error3:
delete_stack(dev);
- return err;
error1:
+ put_device(&dev->dev);
return err;
}