Skip to content

Commit

Permalink
can: gw: remove obsolete checks
Browse files Browse the repository at this point in the history
In commit be286ba ("can: gw: add a variable
limit for CAN frame routings") the detection of the frame routing has been
changed. The former solution required dev->header_ops to be unused (== NULL).

I missed to remove the obsolete checks in the original commit - so here it is.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Oliver Hartkopp authored and Marc Kleine-Budde committed Dec 21, 2013
1 parent ac7686b commit c0ebbdd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/can/gw.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,17 +844,15 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh)
if (!gwj->src.dev)
goto out;

/* check for CAN netdev not using header_ops - see gw_rcv() */
if (gwj->src.dev->type != ARPHRD_CAN || gwj->src.dev->header_ops)
if (gwj->src.dev->type != ARPHRD_CAN)
goto put_src_out;

gwj->dst.dev = dev_get_by_index(&init_net, gwj->ccgw.dst_idx);

if (!gwj->dst.dev)
goto put_src_out;

/* check for CAN netdev not using header_ops - see gw_rcv() */
if (gwj->dst.dev->type != ARPHRD_CAN || gwj->dst.dev->header_ops)
if (gwj->dst.dev->type != ARPHRD_CAN)
goto put_src_dst_out;

gwj->limit_hops = limhops;
Expand Down

0 comments on commit c0ebbdd

Please sign in to comment.