linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Johannes Berg <johannes.berg@intel.com>
Cc: ilw@linux.intel.com, linux-wireless@vger.kernel.org,
	Jonas Gorski <jogo@openwrt.org>
Subject: [PATCH 3/2] iwlwifi: remove unneeded goto from iwl_dbgfs_log_event_read
Date: Wed, 17 Apr 2013 08:23:50 +0200	[thread overview]
Message-ID: <20130417062350.GC1597@redhat.com> (raw)
In-Reply-To: <20130416134053.GB20024@redhat.com>

Make code simpler a bit.

Reported-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlwifi/dvm/debugfs.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
index 17f04de..d532948 100644
--- a/drivers/net/wireless/iwlwifi/dvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
@@ -2241,10 +2241,8 @@ static ssize_t iwl_dbgfs_log_event_read(struct file *file,
 	ssize_t ret;
 
 	ret = iwl_dump_nic_event_log(priv, true, &buf);
-	if (ret < 0)
-		goto err;
-	ret = simple_read_from_buffer(user_buf, count, ppos, buf, ret);
-err:
+	if (ret > 0)
+		ret = simple_read_from_buffer(user_buf, count, ppos, buf, ret);
 	kfree(buf);
 	return ret;
 }
-- 
1.7.11.7

  reply	other threads:[~2013-04-17  6:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 13:38 [PATCH 1/2] iwlwifi: fix freeing uninitialized pointer Stanislaw Gruszka
2013-04-16 13:40 ` [PATCH 2/2] iwlwifi: remove redundant argument from iwl_dump_nic_event_log Stanislaw Gruszka
2013-04-17  6:23   ` Stanislaw Gruszka [this message]
2013-04-17  7:10     ` [PATCH 3/2] iwlwifi: remove unneeded goto from iwl_dbgfs_log_event_read Julian Calaby
2013-04-17  7:12       ` Johannes Berg
2013-04-16 18:40 ` [PATCH 1/2] iwlwifi: fix freeing uninitialized pointer Jonas Gorski
2013-04-17  6:17   ` Stanislaw Gruszka

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=20130417062350.GC1597@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=ilw@linux.intel.com \
    --cc=jogo@openwrt.org \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).