]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/caif/chnl_net.c
ALSA: ctxfi: Fix mono channel map to UNKNOWN
[karo-tx-linux.git] / net / caif / chnl_net.c
index 69771c04ba8fc96a2718f841b6e3d159ee000112..e597733affb82f088203bab569644f312e8d5463 100644 (file)
@@ -94,6 +94,10 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
 
        /* check the version of IP */
        ip_version = skb_header_pointer(skb, 0, 1, &buf);
+       if (!ip_version) {
+               kfree_skb(skb);
+               return -EINVAL;
+       }
 
        switch (*ip_version >> 4) {
        case 4: