From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752920AbbJGSuQ (ORCPT ); Wed, 7 Oct 2015 14:50:16 -0400 Received: from mx0b-0016ce01.pphosted.com ([67.231.156.153]:36871 "EHLO mx0b-0016ce01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbbJGSuP (ORCPT ); Wed, 7 Oct 2015 14:50:15 -0400 Date: Wed, 7 Oct 2015 14:49:22 -0400 From: Chad Dupuis X-X-Sender: cdupuis@dns1.prod.a4.vary.redhat.com To: Maurizio Lombardi CC: Arnd Bergmann , , , "James E.J. Bottomley" , , , Joe Carnuccio , Yuval Mintz , "David S. Miller" , Subject: Re: [PATCH] bnx2fc: reduce stack usage in __bnx2fc_enable In-Reply-To: <56151E03.4050908@redhat.com> Message-ID: References: <5002023.QHmpbQ8s70@wuerfel> <56151E03.4050908@redhat.com> User-Agent: Alpine 2.00 (OSX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII"; format=flowed X-Originating-IP: [10.1.4.10] disclaimer: bypass X-Proofpoint-Virus-Version: vendor=nai engine=5700 definitions=7946 signatures=670639 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1507310000 definitions=main-1510070201 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Oct 2015, Maurizio Lombardi wrote: > 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. > The enablement of the fcoe interface can still proceed if this particular allocation fails so returning 0 would be appropriate here. This patch looks good to me. > > Regards, > Maurizio Lombardi >