Commit 230fa11f authored by Jeshwanth Kumar N K's avatar Jeshwanth Kumar N K Committed by Greg Kroah-Hartman

staging: wlan-ng: prism2mgmt.c Fix break not useful

Fixed up warnings, break is not useful after return statement.
And the exit Label is deleted, now returning inline.
Signed-off-by: default avatarJeshwanth Kumar N K <jeshkumar555@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b553a1a8
...@@ -1107,8 +1107,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) ...@@ -1107,8 +1107,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
if (wlandev->netdev->type == ARPHRD_ETHER) { if (wlandev->netdev->type == ARPHRD_ETHER) {
msg->resultcode.data = msg->resultcode.data =
P80211ENUM_resultcode_invalid_parameters; P80211ENUM_resultcode_invalid_parameters;
result = 0; return 0;
goto exit;
} }
/* Disable monitor mode */ /* Disable monitor mode */
result = hfa384x_cmd_monitor(hw, HFA384x_MONITOR_DISABLE); result = hfa384x_cmd_monitor(hw, HFA384x_MONITOR_DISABLE);
...@@ -1166,9 +1165,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) ...@@ -1166,9 +1165,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
netdev_info(wlandev->netdev, "monitor mode disabled\n"); netdev_info(wlandev->netdev, "monitor mode disabled\n");
msg->resultcode.data = P80211ENUM_resultcode_success; msg->resultcode.data = P80211ENUM_resultcode_success;
result = 0; return 0;
goto exit;
break;
case P80211ENUM_truth_true: case P80211ENUM_truth_true:
/* Disable the port (if enabled), only check Port 0 */ /* Disable the port (if enabled), only check Port 0 */
if (hw->port_enabled[0]) { if (hw->port_enabled[0]) {
...@@ -1313,19 +1310,13 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) ...@@ -1313,19 +1310,13 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
} }
msg->resultcode.data = P80211ENUM_resultcode_success; msg->resultcode.data = P80211ENUM_resultcode_success;
result = 0; return 0;
goto exit;
break;
default: default:
msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters; msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters;
result = 0; return 0;
goto exit;
break;
} }
failed: failed:
msg->resultcode.data = P80211ENUM_resultcode_refused; msg->resultcode.data = P80211ENUM_resultcode_refused;
result = 0; return 0;
exit:
return result;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment