Skip to content

Commit

Permalink
staging: gasket: sysfs: remove check for refcount already zero
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Todd Poynor authored and Greg Kroah-Hartman committed Jul 28, 2018
1 parent 81edee7 commit e7cffa0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/staging/gasket/gasket_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
/*
Expand Down

0 comments on commit e7cffa0

Please sign in to comment.