提交 e7cffa03 编写于 作者: T Todd Poynor 提交者: Greg Kroah-Hartman

staging: gasket: sysfs: remove check for refcount already zero

Remove the check for refcount already zero, which shouldn't be
necessary.
Signed-off-by: NTodd Poynor <toddpoynor@google.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 81edee7a
......@@ -111,8 +111,6 @@ static void put_mapping(struct gasket_sysfs_mapping *mapping)
}
mutex_lock(&mapping->mutex);
if (refcount_read(&mapping->refcount.refcount) == 0)
dev_err(mapping->device, "Refcount is already 0\n");
if (kref_put(&mapping->refcount, release_entry)) {
dev_dbg(mapping->device, "Removing Gasket sysfs mapping\n");
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册