iwlwifi: correct return code for log_event
When dumping event log in debugfs, iwl_dump_nic_event_log() should return the correct error code instead of let the calling function makes it own assumption. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
11fc524941
commit
937c397eb6
@@ -429,8 +429,9 @@ static ssize_t iwl_dbgfs_log_event_read(struct file *file,
|
||||
int pos = 0;
|
||||
ssize_t ret = -ENOMEM;
|
||||
|
||||
pos = priv->cfg->ops->lib->dump_nic_event_log(priv, true, &buf, true);
|
||||
if (pos && buf) {
|
||||
ret = pos = priv->cfg->ops->lib->dump_nic_event_log(
|
||||
priv, true, &buf, true);
|
||||
if (buf) {
|
||||
ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
|
||||
kfree(buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user