Commit d5578941 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Johannes Berg

iwlwifi: remove unneeded goto from iwl_dbgfs_log_event_read

Make code simpler a bit.
Reported-by: default avatarJonas Gorski <jogo@openwrt.org>
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent ade50652
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment