iwlwifi: remove unneeded goto from iwl_dbgfs_log_event_read
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 17 Apr 2013 06:23:50 +0000 (08:23 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 18 Apr 2013 11:34:30 +0000 (13:34 +0200)
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>
drivers/net/wireless/iwlwifi/dvm/debugfs.c

index 17f04de272d89aa005aec8f873a054b6135efb51..d5329489245a74ccb5cac363e3831e36648c1ce3 100644 (file)
@@ -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;
 }