Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbde7c61 authored by Axel Lin's avatar Axel Lin Committed by Greg Kroah-Hartman
Browse files

devtmpfs: Calling delete_path() only when necessary



The deleted variable is always 1 in current code.
Initialize deleted variable to be 0, so delete_path() will be called only when
necessary.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ecfbf6fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -299,7 +299,7 @@ static int handle_remove(const char *nodename, struct device *dev)
{
	struct path parent;
	struct dentry *dentry;
	int deleted = 1;
	int deleted = 0;
	int err;

	dentry = kern_path_locked(nodename, &parent);