Hi Stanislaw, On Wed, Apr 17, 2013 at 4:23 PM, Stanislaw Gruszka <sgruszka@xxxxxxxxxx> wrote: > Make code simpler a bit. > > Reported-by: Jonas Gorski <jogo@xxxxxxxxxxx> > Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> > --- > drivers/net/wireless/iwlwifi/dvm/debugfs.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c > index 17f04de..d532948 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); That's not the same, what happens if ret == 0? Thanks, -- Julian Calaby Email: julian.calaby@xxxxxxxxx Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/ -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html