diff options
-rw-r--r-- | drivers/base/devtmpfs.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index f273bccd5494..95ebc18ded50 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c @@ -389,18 +389,10 @@ static __initdata DECLARE_COMPLETION(setup_done); static int handle(const char *name, umode_t mode, kuid_t uid, kgid_t gid, struct device *dev) { - int ret; - if (mode) - ret = handle_create(name, mode, uid, gid, dev); + return handle_create(name, mode, uid, gid, dev); else - ret = handle_remove(name, dev); - - if (ret) - dev_err(dev, "failed to %s %s, ret = %d\n", - mode ? "create" : "remove", name, ret); - - return ret; + return handle_remove(name, dev); } static void __noreturn devtmpfs_work_loop(void) |