summaryrefslogtreecommitdiffstats
path: root/net/can/af_can.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/can/af_can.c')
-rw-r--r--net/can/af_can.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c
index fa417ca6cbe..547bafc79e2 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -273,8 +273,7 @@ int can_send(struct sk_buff *skb, int loop)
err = net_xmit_errno(err);
if (err) {
- if (newskb)
- kfree_skb(newskb);
+ kfree_skb(newskb);
return err;
}
@@ -828,7 +827,7 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg,
*/
static struct packet_type can_packet __read_mostly = {
- .type = __constant_htons(ETH_P_CAN),
+ .type = cpu_to_be16(ETH_P_CAN),
.dev = NULL,
.func = can_rcv,
};