Skip to content

Commit

Permalink
Revert "driver core: add error handling for devtmpfs_create_node()"
Browse files Browse the repository at this point in the history
This reverts commit 31b4b67 as it is
reported to cause boot regressions.

Link: https://lore.kernel.org/r/[email protected]
Reported-by: Nathan Chancellor <[email protected]>
Cc: Longlong Xia <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Feb 14, 2023
1 parent 48c9899 commit 17c4576
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3602,9 +3602,7 @@ int device_add(struct device *dev)
if (error)
goto SysEntryError;

error = devtmpfs_create_node(dev);
if (error)
goto DevtmpfsError;
devtmpfs_create_node(dev);
}

/* Notify clients of device addition. This call must come
Expand Down Expand Up @@ -3660,8 +3658,6 @@ int device_add(struct device *dev)
done:
put_device(dev);
return error;
DevtmpfsError:
device_remove_sys_dev_entry(dev);
SysEntryError:
if (MAJOR(dev->devt))
device_remove_file(dev, &dev_attr_dev);
Expand Down

0 comments on commit 17c4576

Please sign in to comment.