From mboxrd@z Thu Jan 1 00:00:00 1970 From: baspeters93@gmail.com (Bas Peters) Date: Wed, 31 Dec 2014 14:38:52 +0100 Subject: Question on checpatch.pl warning -- possible unnecessary 'out of memory' message. Message-ID: <20141231133852.GB24068@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Dear all, I'm fixing up my first driver (drivers/isdn/gigaset) to get some experience submitting patches. When I run checkpatch.pl on some of the code, I get the following warning: ./drivers/isdn/gigaset/capi.c:337: WARNING: Possible unnecessary 'out of memory' message The corresponding code is: cskb = alloc_skb(CAPI_DATA_B3_CONF_LEN, GFP_ATOMIC); if (!cskb) { dev_err(cs->dev, "%s: out of memory\n", __func__); return; } All instances of this warning refer to usage of alloc_skb using the GFP_ATOMIC flag. Why does checkpatch show this warning? Is it not good practice to _always_ check whether allocation succeeded or not? I hope someone can explain the nature of this warning and, if right, what it should look like. With kind regards, Bas Peters