Skip to content

Commit

Permalink
Merge branch 'net-break-after-goto'
Browse files Browse the repository at this point in the history
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: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 15, 2014
2 parents 7cf6604 + 138ce91 commit bfde339
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 26 deletions.
1 change: 0 additions & 1 deletion net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,6 @@ static int p9_client_version(struct p9_client *c)
break;
default:
return -EINVAL;
break;
}

if (IS_ERR(req))
Expand Down
1 change: 0 additions & 1 deletion net/caif/cfctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt)
default:
pr_err("Unrecognized Control Frame\n");
goto error;
break;
}
ret = 0;
error:
Expand Down
2 changes: 0 additions & 2 deletions net/core/drop_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,8 @@ static int net_dm_cmd_trace(struct sk_buff *skb,
switch (info->genlhdr->cmd) {
case NET_DM_CMD_START:
return set_all_monitor_traces(TRACE_ON);
break;
case NET_DM_CMD_STOP:
return set_all_monitor_traces(TRACE_OFF);
break;
}

return -ENOTSUPP;
Expand Down
1 change: 0 additions & 1 deletion net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,6 @@ static int strn_len(const char __user * user_buffer, unsigned int maxlen)
case '\t':
case ' ':
goto done_str;
break;
default:
break;
}
Expand Down
1 change: 0 additions & 1 deletion net/ieee802154/6lowpan_iphc.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh)
default:
pr_debug("ERROR: unknown UDP format\n");
goto err;
break;
}

pr_debug("uncompressed UDP ports: src = %d, dst = %d\n",
Expand Down
1 change: 0 additions & 1 deletion net/ipv6/ipv6_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,6 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
return -EFAULT;

return 0;
break;
}

case IPV6_TRANSPARENT:
Expand Down
1 change: 0 additions & 1 deletion net/ipv6/netfilter/ip6t_ipv6header.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ ipv6header_mt6(const struct sk_buff *skb, struct xt_action_param *par)
break;
default:
return false;
break;
}

nexthdr = hp->nexthdr;
Expand Down
1 change: 0 additions & 1 deletion net/irda/af_irda.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,6 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
self->daddr = DEV_ADDR_ANY;
kfree(discoveries);
return -EHOSTUNREACH;
break;
}
}
/* Cleanup our copy of the discovery log */
Expand Down
1 change: 0 additions & 1 deletion net/irda/irlan/irlan_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,6 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
default:
IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ );
return 0;
break;
}

/* Insert at end of sk-buffer */
Expand Down
1 change: 0 additions & 1 deletion net/iucv/af_iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,6 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
default:
err = -EINVAL;
goto out;
break;
}
}

Expand Down
3 changes: 0 additions & 3 deletions net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ static int verify_address_len(const void *p)
* XXX When it can, remove this -EINVAL. -DaveM
*/
return -EINVAL;
break;
}

return 0;
Expand Down Expand Up @@ -536,7 +535,6 @@ pfkey_satype2proto(uint8_t satype)
return IPPROTO_ESP;
case SADB_X_SATYPE_IPCOMP:
return IPPROTO_COMP;
break;
default:
return 0;
}
Expand All @@ -553,7 +551,6 @@ pfkey_proto2satype(uint16_t proto)
return SADB_SATYPE_ESP;
case IPPROTO_COMP:
return SADB_X_SATYPE_IPCOMP;
break;
default:
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion net/mac80211/mesh_hwmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
default:
kfree_skb(skb);
return -ENOTSUPP;
break;
}
*pos++ = ie_len;
*pos++ = flags;
Expand Down
1 change: 0 additions & 1 deletion net/netlabel/netlabel_kapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ int netlbl_cfg_unlbl_map_add(const char *domain,
#endif /* IPv6 */
default:
goto cfg_unlbl_map_add_failure;
break;
}

entry->def.addrsel = addrmap;
Expand Down
2 changes: 0 additions & 2 deletions net/nfc/digital_dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
rc = -EINVAL;
goto exit;
break;
case DIGITAL_NFC_DEP_PFB_SUPERVISOR_PDU:
pr_err("Received a SUPERVISOR PDU\n");
rc = -EINVAL;
goto exit;
break;
}

skb_pull(resp, size);
Expand Down
2 changes: 0 additions & 2 deletions net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -3071,10 +3071,8 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i,
break;
case PACKET_MR_PROMISC:
return dev_set_promiscuity(dev, what);
break;
case PACKET_MR_ALLMULTI:
return dev_set_allmulti(dev, what);
break;
case PACKET_MR_UNICAST:
if (i->alen != dev->addr_len)
return -EINVAL;
Expand Down
1 change: 0 additions & 1 deletion net/sctp/outqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,6 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)

sctp_outq_head_data(q, chunk);
goto sctp_flush_out;
break;

case SCTP_XMIT_OK:
/* The sender is in the SHUTDOWN-PENDING state,
Expand Down
4 changes: 0 additions & 4 deletions net/sctp/sm_statefuns.c
Original file line number Diff line number Diff line change
Expand Up @@ -4182,7 +4182,6 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
case SCTP_CID_ACTION_DISCARD:
/* Discard the packet. */
return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
break;
case SCTP_CID_ACTION_DISCARD_ERR:
/* Generate an ERROR chunk as response. */
hdr = unk_chunk->chunk_hdr;
Expand All @@ -4198,11 +4197,9 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
/* Discard the packet. */
sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
return SCTP_DISPOSITION_CONSUME;
break;
case SCTP_CID_ACTION_SKIP:
/* Skip the chunk. */
return SCTP_DISPOSITION_DISCARD;
break;
case SCTP_CID_ACTION_SKIP_ERR:
/* Generate an ERROR chunk as response. */
hdr = unk_chunk->chunk_hdr;
Expand All @@ -4216,7 +4213,6 @@ sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
}
/* Skip the chunk. */
return SCTP_DISPOSITION_CONSUME;
break;
default:
break;
}
Expand Down
1 change: 0 additions & 1 deletion net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,6 @@ int tipc_ioctl(struct socket *sk, unsigned int cmd, unsigned long arg)
return 0;
}
return -EADDRNOTAVAIL;
break;
default:
return -ENOIOCTLCMD;
}
Expand Down

0 comments on commit bfde339

Please sign in to comment.