Skip to content

Commit

Permalink
rsi: Fixed issue relating to return value.
Browse files Browse the repository at this point in the history
Signed-off-by: Fariya Fatima <fariyaf@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Fariya Fatima authored and John W. Linville committed Apr 9, 2014
1 parent 57a2a09 commit d50c761
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static int rsi_process_pkt(struct rsi_common *common)
if (!common->rx_data_pkt) {
rsi_dbg(ERR_ZONE, "%s: Failed in memory allocation\n",
__func__);
return -1;
return -ENOMEM;
}

status = rsi_sdio_host_intf_read_pkt(adapter,
Expand All @@ -260,12 +260,10 @@ static int rsi_process_pkt(struct rsi_common *common)
}

status = rsi_read_pkt(common, rcv_pkt_len);
kfree(common->rx_data_pkt);
return status;

fail:
kfree(common->rx_data_pkt);
return -1;
return status;
}

/**
Expand Down

0 comments on commit d50c761

Please sign in to comment.