diff options
author | Todd Poynor <toddpoynor@google.com> | 2018-07-28 01:21:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-28 03:24:10 -0400 |
commit | e7cffa03b34265e17de55d5ef8983c91482643a0 (patch) | |
tree | 36067bd0cae67a5b78a8fc44cf33d8cea1be2ccc | |
parent | 81edee7ac83c5782859db4053a866fc0c29f982f (diff) |
staging: gasket: sysfs: remove check for refcount already zero
Remove the check for refcount already zero, which shouldn't be
necessary.
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/gasket/gasket_sysfs.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/staging/gasket/gasket_sysfs.c b/drivers/staging/gasket/gasket_sysfs.c index 418b81797e63..2d8647de697c 100644 --- a/drivers/staging/gasket/gasket_sysfs.c +++ b/drivers/staging/gasket/gasket_sysfs.c | |||
@@ -111,8 +111,6 @@ static void put_mapping(struct gasket_sysfs_mapping *mapping) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | mutex_lock(&mapping->mutex); | 113 | mutex_lock(&mapping->mutex); |
114 | if (refcount_read(&mapping->refcount.refcount) == 0) | ||
115 | dev_err(mapping->device, "Refcount is already 0\n"); | ||
116 | if (kref_put(&mapping->refcount, release_entry)) { | 114 | if (kref_put(&mapping->refcount, release_entry)) { |
117 | dev_dbg(mapping->device, "Removing Gasket sysfs mapping\n"); | 115 | dev_dbg(mapping->device, "Removing Gasket sysfs mapping\n"); |
118 | /* | 116 | /* |