On Thu, 12 Nov 2015 02:55:40 +0000, "Gavin O'Leary" said:

> What is this warning about? How do I go about fixing it?
>
> Thank you,

Let's cut-n-paste 2 more lines out of the file:

    613         /* Allocate the rxmeta */
    614         rxmeta = kzalloc(sizeof(struct p80211_rxmeta), GFP_ATOMIC);
    615
    616         if (rxmeta == NULL) {
    617                 netdev_err(wlandev->netdev,
    618                            "%s: Failed to allocate rxmeta.\n", 
wlandev->name);
    619                 result = 1;
    620                 goto exit;
    621         }

Lesson 1:  Under what conditions will the kzalloc return NULL?  If this happens,
what are the chances you'll have a chance to *see* the message? (Hint - what
size is that struct?  If the kernel can't find that much free memory, what are
the chances you still have a functional syslog daemon?)

Lesson 2: The wisest thing ever said about checkpatch.pl:
" the code is more what you'd call "guidelines" than actual rules."
                        -- Captain Barbossa

Attachment: pgppmlSh42XMq.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to