Skip to content

Commit

Permalink
Driver Core: devtmpfs: cleanup node on device creation error
Browse files Browse the repository at this point in the history
Signed-off-by: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
kaysievers authored and gregkh committed Dec 11, 2009
1 parent 015bf43 commit ad72956
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,8 @@ int device_add(struct device *dev)
AttrsError:
device_remove_class_symlinks(dev);
SymlinkError:
if (MAJOR(dev->devt))
devtmpfs_delete_node(dev);
if (MAJOR(dev->devt))
device_remove_sys_dev_entry(dev);
devtattrError:
Expand Down

0 comments on commit ad72956

Please sign in to comment.