Commit bfde3398 authored by David S. Miller's avatar David S. Miller

Merge branch 'net-break-after-goto'

Fabian Frederick says:

====================
net: remove unnecessary break after goto/return

Small patchset addressing break redundancy on net branch
(suggested by Joe Perches).
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 7cf66041 138ce910
...@@ -959,7 +959,6 @@ static int p9_client_version(struct p9_client *c) ...@@ -959,7 +959,6 @@ static int p9_client_version(struct p9_client *c)
break; break;
default: default:
return -EINVAL; return -EINVAL;
break;
} }
if (IS_ERR(req)) if (IS_ERR(req))
......
...@@ -547,7 +547,6 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt) ...@@ -547,7 +547,6 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt)
default: default:
pr_err("Unrecognized Control Frame\n"); pr_err("Unrecognized Control Frame\n");
goto error; goto error;
break;
} }
ret = 0; ret = 0;
error: error:
......
...@@ -289,10 +289,8 @@ static int net_dm_cmd_trace(struct sk_buff *skb, ...@@ -289,10 +289,8 @@ static int net_dm_cmd_trace(struct sk_buff *skb,
switch (info->genlhdr->cmd) { switch (info->genlhdr->cmd) {
case NET_DM_CMD_START: case NET_DM_CMD_START:
return set_all_monitor_traces(TRACE_ON); return set_all_monitor_traces(TRACE_ON);
break;
case NET_DM_CMD_STOP: case NET_DM_CMD_STOP:
return set_all_monitor_traces(TRACE_OFF); return set_all_monitor_traces(TRACE_OFF);
break;
} }
return -ENOTSUPP; return -ENOTSUPP;
......
...@@ -804,7 +804,6 @@ static int strn_len(const char __user * user_buffer, unsigned int maxlen) ...@@ -804,7 +804,6 @@ static int strn_len(const char __user * user_buffer, unsigned int maxlen)
case '\t': case '\t':
case ' ': case ' ':
goto done_str; goto done_str;
break;
default: default:
break; break;
} }
......
...@@ -297,7 +297,6 @@ uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh) ...@@ -297,7 +297,6 @@ uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh)
default: default:
pr_debug("ERROR: unknown UDP format\n"); pr_debug("ERROR: unknown UDP format\n");
goto err; goto err;
break;
} }
pr_debug("uncompressed UDP ports: src = %d, dst = %d\n", pr_debug("uncompressed UDP ports: src = %d, dst = %d\n",
......
...@@ -1162,7 +1162,6 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, ...@@ -1162,7 +1162,6 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
return -EFAULT; return -EFAULT;
return 0; return 0;
break;
} }
case IPV6_TRANSPARENT: case IPV6_TRANSPARENT:
......
...@@ -94,7 +94,6 @@ ipv6header_mt6(const struct sk_buff *skb, struct xt_action_param *par) ...@@ -94,7 +94,6 @@ ipv6header_mt6(const struct sk_buff *skb, struct xt_action_param *par)
break; break;
default: default:
return false; return false;
break;
} }
nexthdr = hp->nexthdr; nexthdr = hp->nexthdr;
......
...@@ -674,7 +674,6 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) ...@@ -674,7 +674,6 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
self->daddr = DEV_ADDR_ANY; self->daddr = DEV_ADDR_ANY;
kfree(discoveries); kfree(discoveries);
return -EHOSTUNREACH; return -EHOSTUNREACH;
break;
} }
} }
/* Cleanup our copy of the discovery log */ /* Cleanup our copy of the discovery log */
......
...@@ -1024,7 +1024,6 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, ...@@ -1024,7 +1024,6 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
default: default:
IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ ); IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ );
return 0; return 0;
break;
} }
/* Insert at end of sk-buffer */ /* Insert at end of sk-buffer */
......
...@@ -1103,7 +1103,6 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -1103,7 +1103,6 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
default: default:
err = -EINVAL; err = -EINVAL;
goto out; goto out;
break;
} }
} }
......
...@@ -405,7 +405,6 @@ static int verify_address_len(const void *p) ...@@ -405,7 +405,6 @@ static int verify_address_len(const void *p)
* XXX When it can, remove this -EINVAL. -DaveM * XXX When it can, remove this -EINVAL. -DaveM
*/ */
return -EINVAL; return -EINVAL;
break;
} }
return 0; return 0;
...@@ -536,7 +535,6 @@ pfkey_satype2proto(uint8_t satype) ...@@ -536,7 +535,6 @@ pfkey_satype2proto(uint8_t satype)
return IPPROTO_ESP; return IPPROTO_ESP;
case SADB_X_SATYPE_IPCOMP: case SADB_X_SATYPE_IPCOMP:
return IPPROTO_COMP; return IPPROTO_COMP;
break;
default: default:
return 0; return 0;
} }
...@@ -553,7 +551,6 @@ pfkey_proto2satype(uint16_t proto) ...@@ -553,7 +551,6 @@ pfkey_proto2satype(uint16_t proto)
return SADB_SATYPE_ESP; return SADB_SATYPE_ESP;
case IPPROTO_COMP: case IPPROTO_COMP:
return SADB_X_SATYPE_IPCOMP; return SADB_X_SATYPE_IPCOMP;
break;
default: default:
return 0; return 0;
} }
......
...@@ -157,7 +157,6 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags, ...@@ -157,7 +157,6 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
default: default:
kfree_skb(skb); kfree_skb(skb);
return -ENOTSUPP; return -ENOTSUPP;
break;
} }
*pos++ = ie_len; *pos++ = ie_len;
*pos++ = flags; *pos++ = flags;
......
...@@ -170,7 +170,6 @@ int netlbl_cfg_unlbl_map_add(const char *domain, ...@@ -170,7 +170,6 @@ int netlbl_cfg_unlbl_map_add(const char *domain,
#endif /* IPv6 */ #endif /* IPv6 */
default: default:
goto cfg_unlbl_map_add_failure; goto cfg_unlbl_map_add_failure;
break;
} }
entry->def.addrsel = addrmap; entry->def.addrsel = addrmap;
......
...@@ -457,12 +457,10 @@ static void digital_tg_recv_dep_req(struct nfc_digital_dev *ddev, void *arg, ...@@ -457,12 +457,10 @@ static void digital_tg_recv_dep_req(struct nfc_digital_dev *ddev, void *arg,
pr_err("Received a ACK/NACK PDU\n"); pr_err("Received a ACK/NACK PDU\n");
rc = -EINVAL; rc = -EINVAL;
goto exit; goto exit;
break;
case DIGITAL_NFC_DEP_PFB_SUPERVISOR_PDU: case DIGITAL_NFC_DEP_PFB_SUPERVISOR_PDU:
pr_err("Received a SUPERVISOR PDU\n"); pr_err("Received a SUPERVISOR PDU\n");
rc = -EINVAL; rc = -EINVAL;
goto exit; goto exit;
break;
} }
skb_pull(resp, size); skb_pull(resp, size);
......
...@@ -3071,10 +3071,8 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i, ...@@ -3071,10 +3071,8 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i,
break; break;
case PACKET_MR_PROMISC: case PACKET_MR_PROMISC:
return dev_set_promiscuity(dev, what); return dev_set_promiscuity(dev, what);
break;
case PACKET_MR_ALLMULTI: case PACKET_MR_ALLMULTI:
return dev_set_allmulti(dev, what); return dev_set_allmulti(dev, what);
break;
case PACKET_MR_UNICAST: case PACKET_MR_UNICAST:
if (i->alen != dev->addr_len) if (i->alen != dev->addr_len)
return -EINVAL; return -EINVAL;
......
...@@ -1025,7 +1025,6 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) ...@@ -1025,7 +1025,6 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
sctp_outq_head_data(q, chunk); sctp_outq_head_data(q, chunk);
goto sctp_flush_out; goto sctp_flush_out;
break;
case SCTP_XMIT_OK: case SCTP_XMIT_OK:
/* The sender is in the SHUTDOWN-PENDING state, /* The sender is in the SHUTDOWN-PENDING state,
......
...@@ -4182,7 +4182,6 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net, ...@@ -4182,7 +4182,6 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
case SCTP_CID_ACTION_DISCARD: case SCTP_CID_ACTION_DISCARD:
/* Discard the packet. */ /* Discard the packet. */
return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
break;
case SCTP_CID_ACTION_DISCARD_ERR: case SCTP_CID_ACTION_DISCARD_ERR:
/* Generate an ERROR chunk as response. */ /* Generate an ERROR chunk as response. */
hdr = unk_chunk->chunk_hdr; hdr = unk_chunk->chunk_hdr;
...@@ -4198,11 +4197,9 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net, ...@@ -4198,11 +4197,9 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
/* Discard the packet. */ /* Discard the packet. */
sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
return SCTP_DISPOSITION_CONSUME; return SCTP_DISPOSITION_CONSUME;
break;
case SCTP_CID_ACTION_SKIP: case SCTP_CID_ACTION_SKIP:
/* Skip the chunk. */ /* Skip the chunk. */
return SCTP_DISPOSITION_DISCARD; return SCTP_DISPOSITION_DISCARD;
break;
case SCTP_CID_ACTION_SKIP_ERR: case SCTP_CID_ACTION_SKIP_ERR:
/* Generate an ERROR chunk as response. */ /* Generate an ERROR chunk as response. */
hdr = unk_chunk->chunk_hdr; hdr = unk_chunk->chunk_hdr;
...@@ -4216,7 +4213,6 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net, ...@@ -4216,7 +4213,6 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
} }
/* Skip the chunk. */ /* Skip the chunk. */
return SCTP_DISPOSITION_CONSUME; return SCTP_DISPOSITION_CONSUME;
break;
default: default:
break; break;
} }
......
...@@ -2028,7 +2028,6 @@ int tipc_ioctl(struct socket *sk, unsigned int cmd, unsigned long arg) ...@@ -2028,7 +2028,6 @@ int tipc_ioctl(struct socket *sk, unsigned int cmd, unsigned long arg)
return 0; return 0;
} }
return -EADDRNOTAVAIL; return -EADDRNOTAVAIL;
break;
default: default:
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
} }
......
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