diff options
author | Tapasweni Pathak <tapaswenipathak@gmail.com> | 2014-10-10 07:43:36 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-20 10:30:13 +0800 |
commit | 586e8b6845a9efdc2cfefc91e949a10806d2c623 (patch) | |
tree | ae37e9cd63e2916e054e72bbcd00b894b91f0bf1 | |
parent | 3f8ddea02c1c8f42a7a88d5db8ebf045cb0e82fa (diff) | |
download | lwn-586e8b6845a9efdc2cfefc91e949a10806d2c623.tar.gz lwn-586e8b6845a9efdc2cfefc91e949a10806d2c623.zip |
staging: vt6655: Remove unused code inside switch case
This patch removes dead code in private_ioctl function and
iwctl_siwmode function, in file ioctl.c.
Inside switch, for a case no code gets executed
after break.
This was detected by smatch.
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/vt6655/ioctl.c | 40 | ||||
-rw-r--r-- | drivers/staging/vt6655/iwctl.c | 9 |
2 files changed, 0 insertions, 49 deletions
diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 628f5b2359c5..c2b6763c8ab9 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -45,7 +45,6 @@ int private_ioctl(struct vnt_private *pDevice, struct ifreq *rq) int result = 0; PWLAN_IE_SSID pItemSSID; SCmdBSSJoin sJoinCmd; - SCmdZoneTypeSet sZoneTypeCmd; SCmdScan sScanCmd; SCmdStartAP sStartAPCmd; SCmdSetWEP sWEPCmd; @@ -108,45 +107,6 @@ int private_ioctl(struct vnt_private *pDevice, struct ifreq *rq) result = -EOPNOTSUPP; break; - if (copy_from_user(&sZoneTypeCmd, pReq->data, sizeof(SCmdZoneTypeSet))) { - result = -EFAULT; - break; - } - - if (sZoneTypeCmd.bWrite == true) { - /* write zonetype */ - if (sZoneTypeCmd.ZoneType == ZoneType_USA) { - /* set to USA */ - pr_debug("set_ZoneType:USA\n"); - } else if (sZoneTypeCmd.ZoneType == ZoneType_Japan) { - /* set to Japan */ - pr_debug("set_ZoneType:Japan\n"); - } else if (sZoneTypeCmd.ZoneType == ZoneType_Europe) { - /* set to Europe */ - pr_debug("set_ZoneType:Europe\n"); - } - } else { - /* read zonetype */ - unsigned char zonetype = 0; - - if (zonetype == 0x00) { /* USA */ - sZoneTypeCmd.ZoneType = ZoneType_USA; - } else if (zonetype == 0x01) { /* Japan */ - sZoneTypeCmd.ZoneType = ZoneType_Japan; - } else if (zonetype == 0x02) { /* Europe */ - sZoneTypeCmd.ZoneType = ZoneType_Europe; - } else { /* Unknown ZoneType */ - pr_err("Error:ZoneType[%x] Unknown ???\n", zonetype); - result = -EFAULT; - break; - } - if (copy_to_user(pReq->data, &sZoneTypeCmd, sizeof(SCmdZoneTypeSet))) { - result = -EFAULT; - break; - } - } - break; - case WLAN_CMD_BSS_JOIN: if (pDevice->bMACSuspend == true) { if (pDevice->bRadioOff == true) diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index 8f3e190a55b9..cc261d7dd058 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -464,15 +464,6 @@ int iwctl_siwmode(struct net_device *dev, rc = -EOPNOTSUPP; break; - if (pMgmt->eConfigMode != WMAC_CONFIG_AP) { - pMgmt->eConfigMode = WMAC_CONFIG_AP; - if (pDevice->flags & DEVICE_FLAGS_OPENED) - pDevice->bCommit = true; - - } - pr_debug("set mode to Access Point\n"); - break; - case IW_MODE_REPEAT: pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA; rc = -EOPNOTSUPP; |