linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Todd Poynor <toddpoynor@gmail.com>
To: Rob Springer <rspringer@google.com>,
	John Joseph <jnjoseph@google.com>,
	Ben Chan <benchan@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Todd Poynor <toddpoynor@google.com>
Subject: [PATCH 1/5] staging: gasket: sysfs: remove check for refcount already zero
Date: Fri, 27 Jul 2018 22:21:56 -0700	[thread overview]
Message-ID: <20180728052200.228796-2-toddpoynor@gmail.com> (raw)
In-Reply-To: <20180728052200.228796-1-toddpoynor@gmail.com>

From: Todd Poynor <toddpoynor@google.com>

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

Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
 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(&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");
 		/*
-- 
2.18.0.345.g5c9ce644c3-goog


  reply	other threads:[~2018-07-28  5:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-28  5:21 [PATCH 0/5] staging: gasket: fixes and cleanups Todd Poynor
2018-07-28  5:21 ` Todd Poynor [this message]
2018-07-28  5:21 ` [PATCH 2/5] staging: gasket: apex: fixup undefined PCI class Todd Poynor
2018-07-28  5:21 ` [PATCH 3/5] staging: gasket: sysfs: remove unnecessary NULL check on device ptr Todd Poynor
2018-07-28  5:21 ` [PATCH 4/5] staging: gasket: page table: remove code for "no dma_ops" Todd Poynor
2018-07-28  5:22 ` [PATCH 5/5] staging: gasket: core: hold reference on device kobj while in use Todd Poynor
2018-07-28  7:23   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180728052200.228796-2-toddpoynor@gmail.com \
    --to=toddpoynor@gmail.com \
    --cc=benchan@chromium.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jnjoseph@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rspringer@google.com \
    --cc=toddpoynor@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).