lkml.org 
[lkml]   [2010]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/9] staging: otus: check kmalloc() return value
On Fri, Jul 30, 2010 at 03:08:00PM +0400, Kulikov Vasiliy wrote:
> if (size > 0) {
> buf = kmalloc(size, GFP_KERNEL);
> + if (buf == NULL) {
> + pr_err("zfwUsbSubmitControl() failed, "
> + "kmalloc() returned NULL\n");

This isn't a big deal, but the pr_err() isn't needed. kmalloc() already
prints a message unless __GFP_NOWARN is used.

regards,
dan carpenter




\
 
 \ /
  Last update: 2010-07-30 16:09    [W:0.098 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site