From 230fa11f5fab094512b6ad131ae1de86b12466f2 Mon Sep 17 00:00:00 2001 From: Jeshwanth Kumar N K Date: Fri, 15 Aug 2014 01:41:04 +0530 Subject: [PATCH] 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: Jeshwanth Kumar N K Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/prism2mgmt.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index e6a82d3303c1..013a6240f193 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -1107,8 +1107,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) if (wlandev->netdev->type == ARPHRD_ETHER) { msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters; - result = 0; - goto exit; + return 0; } /* Disable monitor mode */ result = hfa384x_cmd_monitor(hw, HFA384x_MONITOR_DISABLE); @@ -1166,9 +1165,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) netdev_info(wlandev->netdev, "monitor mode disabled\n"); msg->resultcode.data = P80211ENUM_resultcode_success; - result = 0; - goto exit; - break; + return 0; case P80211ENUM_truth_true: /* Disable the port (if enabled), only check Port 0 */ if (hw->port_enabled[0]) { @@ -1313,19 +1310,13 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) } msg->resultcode.data = P80211ENUM_resultcode_success; - result = 0; - goto exit; - break; + return 0; default: msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters; - result = 0; - goto exit; - break; + return 0; } failed: msg->resultcode.data = P80211ENUM_resultcode_refused; - result = 0; -exit: - return result; + return 0; } -- 2.39.5