diff options
Diffstat (limited to '')
-rw-r--r-- | fs/char_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/char_dev.c b/fs/char_dev.c index 5fffd5050..2c3d519b2 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c @@ -553,7 +553,7 @@ int cdev_device_add(struct cdev *cdev, struct device *dev) } rc = device_add(dev); - if (rc) + if (rc && dev->devt) cdev_del(cdev); return rc; |