From mboxrd@z Thu Jan 1 00:00:00 1970 From: xerofoify@gmail.com (nick) Date: Mon, 08 Sep 2014 17:05:39 -0400 Subject: Bug Patch In-Reply-To: <15552.1410199704@turing-police.cc.vt.edu> References: <540D86B2.6080505@gmail.com> <15552.1410199704@turing-police.cc.vt.edu> Message-ID: <540E1A23.2040200@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On 14-09-08 02:08 PM, Valdis.Kletnieks at vt.edu wrote: > On Mon, 08 Sep 2014 06:36:34 -0400, nick said: > >> Found a bug and attempted to fix it >> sub_skb = dev_alloc_skb(nSubframe_Length + 12); >> + if (!sub_skb) >> + return -ENOMEM; > > Nick - we've told you before to research this stuff more fully before > posting patches. As others have pointed out, there's exactly one caller, who > wants a different return on error. > > For bonus points - explain why you're returning a -ENOMEM from > a function that's declared as 'static u8 parse_subframe(...'. > > This is *NOT* how you convince us that you should be allowed anywhere near > kernel code. > Fixed the patch, and Valdis thanks for the note about reading the code properly first. Nick -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-staging-Fix-ieee_80211_rx.c-to-check-for-Null-alloca.patch Type: text/x-patch Size: 1145 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140908/4028da71/attachment.bin