summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2013-04-17 08:23:50 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-04-18 13:34:30 +0200
commitd557894106f71cc23c9d053876d0c367c285950f (patch)
tree6ccd4cf66ab9b79fcb64dec3705ab072f2ce2f88 /drivers
parentade50652fc60314f433c6d28322a605874fb3996 (diff)
downloadblackbird-op-linux-d557894106f71cc23c9d053876d0c367c285950f.tar.gz
blackbird-op-linux-d557894106f71cc23c9d053876d0c367c285950f.zip
iwlwifi: remove unneeded goto from iwl_dbgfs_log_event_read
Make code simpler a bit. Reported-by: Jonas Gorski <jogo@openwrt.org> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/debugfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
index 17f04de272d8..d5329489245a 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;
}
OpenPOWER on IntegriCloud