All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/enic:fix no return value bug
@ 2017-08-23  8:49 Rongqiang XIE
  2017-08-28 11:31 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Rongqiang XIE @ 2017-08-23  8:49 UTC (permalink / raw)
  To: johndale; +Cc: dev, Rongqiang XIE

In enic_alloc_consistent() function, if the value mze malloc
faile, !mze is true, free the rz should return NULL.

Signed-off-by: Rongqiang XIE <xie.rongqiang@zte.com.cn>
---
 drivers/net/enic/enic_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 40dbec7..1d956cd 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -368,6 +368,7 @@ void enic_init_vnic_resources(struct enic *enic)
 		pr_err("%s : Failed to allocate memory for memzone list\n",
 		       __func__);
 		rte_memzone_free(rz);
+		return NULL;
 	}
 
 	mze->rz = rz;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/enic:fix no return value bug
  2017-08-23  8:49 [PATCH] net/enic:fix no return value bug Rongqiang XIE
@ 2017-08-28 11:31 ` Ferruh Yigit
  2017-08-28 11:36   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2017-08-28 11:31 UTC (permalink / raw)
  To: Rongqiang XIE, johndale; +Cc: dev

On 8/23/2017 9:49 AM, Rongqiang XIE wrote:
> In enic_alloc_consistent() function, if the value mze malloc
> faile, !mze is true, free the rz should return NULL.
> 
> Signed-off-by: Rongqiang XIE <xie.rongqiang@zte.com.cn>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/enic:fix no return value bug
  2017-08-28 11:31 ` Ferruh Yigit
@ 2017-08-28 11:36   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-08-28 11:36 UTC (permalink / raw)
  To: Rongqiang XIE, johndale; +Cc: dev

On 8/28/2017 12:31 PM, Ferruh Yigit wrote:
> On 8/23/2017 9:49 AM, Rongqiang XIE wrote:
>> In enic_alloc_consistent() function, if the value mze malloc
>> faile, !mze is true, free the rz should return NULL.
>>
>> Signed-off-by: Rongqiang XIE <xie.rongqiang@zte.com.cn>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-28 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23  8:49 [PATCH] net/enic:fix no return value bug Rongqiang XIE
2017-08-28 11:31 ` Ferruh Yigit
2017-08-28 11:36   ` Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.