[PATCH 1/5] staging: gasket: sysfs: remove check for refcount already zero

2018-07-27 Thread Todd Poynor
From: Todd Poynor 

Remove the check for refcount already zero, which shouldn't be
necessary.

Signed-off-by: Todd Poynor 
---
 drivers/staging/gasket/gasket_sysfs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/gasket/gasket_sysfs.c 
b/drivers/staging/gasket/gasket_sysfs.c
index 418b81797e638..2d8647de697cd 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(>mutex);
-   if (refcount_read(>refcount.refcount) == 0)
-   dev_err(mapping->device, "Refcount is already 0\n");
if (kref_put(>refcount, release_entry)) {
dev_dbg(mapping->device, "Removing Gasket sysfs mapping\n");
/*
-- 
2.18.0.345.g5c9ce644c3-goog



[PATCH 1/5] staging: gasket: sysfs: remove check for refcount already zero

2018-07-27 Thread Todd Poynor
From: Todd Poynor 

Remove the check for refcount already zero, which shouldn't be
necessary.

Signed-off-by: Todd Poynor 
---
 drivers/staging/gasket/gasket_sysfs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/gasket/gasket_sysfs.c 
b/drivers/staging/gasket/gasket_sysfs.c
index 418b81797e638..2d8647de697cd 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(>mutex);
-   if (refcount_read(>refcount.refcount) == 0)
-   dev_err(mapping->device, "Refcount is already 0\n");
if (kref_put(>refcount, release_entry)) {
dev_dbg(mapping->device, "Removing Gasket sysfs mapping\n");
/*
-- 
2.18.0.345.g5c9ce644c3-goog