lkml.org 
[lkml]   [2015]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] bnx2fc: reduce stack usage in __bnx2fc_enable
From
Date
Hi,

On 10/07/2015 03:11 PM, Arnd Bergmann wrote:
> - memset(&npiv_tbl, 0, sizeof(npiv_tbl));
> - if (hba->cnic->get_fc_npiv_tbl(hba->cnic, &npiv_tbl))
> + npiv_tbl = kzalloc(sizeof(struct cnic_fc_npiv_tbl), GFP_KERNEL);
> + if (!npiv_tbl)
> goto done;
>

If kzalloc() fails perhaps the function should return -ENOMEM, not zero.


Regards,
Maurizio Lombardi


\
 
 \ /
  Last update: 2015-10-07 16:01    [W:0.046 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site