Skip to content

Commit

Permalink
iwlwifi: remove unneeded goto from iwl_dbgfs_log_event_read
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stanislaw Gruszka authored and Johannes Berg committed Apr 18, 2013
1 parent ade5065 commit d557894
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/iwlwifi/dvm/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d557894

Please sign in to comment.