mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
Staging: wlan-ng: clean up assignments in if statements
Trivial changes to code-paths. Signed-off-by: Svenne Krap <svenne@krap.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
bc2955ddf4
commit
46800b225f
1 changed files with 16 additions and 8 deletions
|
@ -1909,16 +1909,20 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* Retrieve the buffer loc&size and timeout */
|
/* Retrieve the buffer loc&size and timeout */
|
||||||
if ((result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
|
|
||||||
&(hw->bufinfo),
|
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
|
||||||
sizeof(hw->bufinfo)))) {
|
&(hw->bufinfo), sizeof(hw->bufinfo));
|
||||||
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page);
|
hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page);
|
||||||
hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset);
|
hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset);
|
||||||
hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len);
|
hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len);
|
||||||
if ((result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
|
|
||||||
&(hw->dltimeout)))) {
|
result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
|
||||||
|
&(hw->dltimeout));
|
||||||
|
|
||||||
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
hw->dltimeout = le16_to_cpu(hw->dltimeout);
|
hw->dltimeout = le16_to_cpu(hw->dltimeout);
|
||||||
|
@ -3073,7 +3077,9 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw)
|
||||||
|
|
||||||
/* Now submit the URB and update the CTLX's state
|
/* Now submit the URB and update the CTLX's state
|
||||||
*/
|
*/
|
||||||
if ((result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC)) == 0) {
|
|
||||||
|
result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC);
|
||||||
|
if (result == 0) {
|
||||||
/* This CTLX is now running on the active queue */
|
/* This CTLX is now running on the active queue */
|
||||||
head->state = CTLX_REQ_SUBMITTED;
|
head->state = CTLX_REQ_SUBMITTED;
|
||||||
|
|
||||||
|
@ -3599,7 +3605,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
|
||||||
skblen - sizeof(p80211_caphdr_t));
|
skblen - sizeof(p80211_caphdr_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((skb = dev_alloc_skb(skblen)) == NULL) {
|
skb = dev_alloc_skb(skblen);
|
||||||
|
if (skb == NULL) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"alloc_skb failed trying to allocate %d bytes\n",
|
"alloc_skb failed trying to allocate %d bytes\n",
|
||||||
skblen);
|
skblen);
|
||||||
|
@ -3870,7 +3877,8 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
|
||||||
|
|
||||||
delresp:
|
delresp:
|
||||||
if (delete_resptimer) {
|
if (delete_resptimer) {
|
||||||
if ((timer_ok = del_timer(&hw->resptimer)) != 0) {
|
timer_ok = del_timer(&hw->resptimer);
|
||||||
|
if (timer_ok != 0) {
|
||||||
hw->resp_timer_done = 1;
|
hw->resp_timer_done = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue