staging: gasket: sysfs: remove check for refcount already zero
authorTodd Poynor <toddpoynor@google.com>
Sat, 28 Jul 2018 05:21:56 +0000 (22:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Jul 2018 07:24:10 +0000 (09:24 +0200)
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>
drivers/staging/gasket/gasket_sysfs.c

index 418b81797e638d2dba1dd85d8daef25f27c5e034..2d8647de697cd9de9d40af54aa81b1739a4a2423 100644 (file)
@@ -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");
                /*