[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3bd7d66c-bfcb-f462-cacd-f211170c12f5@cogentembedded.com>
Date: Sun, 4 Dec 2016 13:24:25 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Pan Bian <bianpan201604@....com>,
Michal Kalderon <michal.kalderon@...ium.com>,
Yuval Mintz <Yuval.Mintz@...ium.com>,
Ariel Elior <ariel.elior@...ium.com>,
everest-linux-l2@...ium.com, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Pan Bian <bianpan2016@....com>
Subject: Re: [PATCH 1/1] net: bnx2x: fix improper return value
On 12/4/2016 11:39 AM, Pan Bian wrote:
> From: Pan Bian <bianpan2016@....com>
>
> Marco BNX2X_ALLOC_AND_SET(arr, lbl, func) calls kmalloc() to allocate
Macro.
> memory, and jumps to label "lbl" if the allocation fails. Label "lbl"
> first cleans memory and then returns variable rc. Before calling the
> macro, the value of variable rc is 0. Because 0 means no error, the
> callers of bnx2x_init_firmware() may be misled. This patch fixes the bug,
> assigning "-ENOMEM" to rc before calling macro NX2X_ALLOC_AND_SET().
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189141
>
> Signed-off-by: Pan Bian <bianpan2016@....com>
[...]
MBR, Sergei
Powered by blists - more mailing lists