diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2009-10-09 06:38:45 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 23:47:55 +0300 |
commit | c0bbd57679efc2350703a1c0f3fc624cbcaba55f (patch) | |
tree | 9d7abd3b727fd64c9ccf782277ce90a6656f861a /drivers/net/wireless/libertas/scan.c | |
parent | be823e5b2d71d367b5e27496e2b19d453e21936e (diff) | |
download | linux-c0bbd57679efc2350703a1c0f3fc624cbcaba55f.tar.xz |
libertas: Check return status of command functions
Return status of lbs_prepare_and_send_command and lbs_cmd_with_response
functions is not checked at some places. Those checks are added.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 6c95af3023cc..d8fc2b8b3027 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c @@ -1022,9 +1022,12 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, return -EAGAIN; /* Update RSSI if current BSS is a locally created ad-hoc BSS */ - if ((priv->mode == IW_MODE_ADHOC) && priv->adhoccreate) - lbs_prepare_and_send_command(priv, CMD_802_11_RSSI, 0, - CMD_OPTION_WAITFORRSP, 0, NULL); + if ((priv->mode == IW_MODE_ADHOC) && priv->adhoccreate) { + err = lbs_prepare_and_send_command(priv, CMD_802_11_RSSI, 0, + CMD_OPTION_WAITFORRSP, 0, NULL); + if (err) + goto out; + } mutex_lock(&priv->lock); list_for_each_entry_safe (iter_bss, safe, &priv->network_list, list) { @@ -1058,7 +1061,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, dwrq->length = (ev - extra); dwrq->flags = 0; - +out: lbs_deb_leave_args(LBS_DEB_WEXT, "ret %d", err); return err; } |