From: Todd Poynor Date: Sat, 28 Jul 2018 05:21:56 +0000 (-0700) Subject: staging: gasket: sysfs: remove check for refcount already zero X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e7cffa03b34265e17de55d5ef8983c91482643a0;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- 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) } 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"); /*