kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ice: Fix error return code in ice_add_prof()
@ 2020-04-27 12:12 Wei Yongjun
  2020-05-01  3:29 ` David Miller
  2020-06-04 19:16 ` [Intel-wired-lan] " Bowers, AndrewX
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2020-04-27 12:12 UTC (permalink / raw)
  To: Jeff Kirsher, Tony Nguyen
  Cc: Wei Yongjun, intel-wired-lan, netdev, kernel-janitors

Fix to return a error code from the error handling case
instead of 0, as done elsewhere in this function.

Fixes: 31ad4e4ee1e4 ("ice: Allocate flow profile")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
index 42bac3ec5526..e7a2671222d2 100644
--- a/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
+++ b/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
@@ -2962,8 +2962,10 @@ ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],
 
 	/* add profile info */
 	prof = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*prof), GFP_KERNEL);
-	if (!prof)
+	if (!prof) {
+		status = ICE_ERR_NO_MEMORY;
 		goto err_ice_add_prof;
+	}
 
 	prof->profile_cookie = id;
 	prof->prof_id = prof_id;

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

* Re: [PATCH net-next] ice: Fix error return code in ice_add_prof()
  2020-04-27 12:12 [PATCH net-next] ice: Fix error return code in ice_add_prof() Wei Yongjun
@ 2020-05-01  3:29 ` David Miller
  2020-06-04 19:16 ` [Intel-wired-lan] " Bowers, AndrewX
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-05-01  3:29 UTC (permalink / raw)
  To: weiyongjun1
  Cc: jeffrey.t.kirsher, anthony.l.nguyen, intel-wired-lan, netdev,
	kernel-janitors

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Mon, 27 Apr 2020 12:12:28 +0000

> Fix to return a error code from the error handling case
> instead of 0, as done elsewhere in this function.
> 
> Fixes: 31ad4e4ee1e4 ("ice: Allocate flow profile")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied, thanks.

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

* RE: [Intel-wired-lan] [PATCH net-next] ice: Fix error return code in ice_add_prof()
  2020-04-27 12:12 [PATCH net-next] ice: Fix error return code in ice_add_prof() Wei Yongjun
  2020-05-01  3:29 ` David Miller
@ 2020-06-04 19:16 ` Bowers, AndrewX
  1 sibling, 0 replies; 3+ messages in thread
From: Bowers, AndrewX @ 2020-06-04 19:16 UTC (permalink / raw)
  Cc: intel-wired-lan, kernel-janitors, netdev

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Wei Yongjun
> Sent: Monday, April 27, 2020 5:12 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; kernel-janitors@vger.kernel.org; Wei
> Yongjun <weiyongjun1@huawei.com>; netdev@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH net-next] ice: Fix error return code in
> ice_add_prof()
> 
> Fix to return a error code from the error handling case instead of 0, as done
> elsewhere in this function.
> 
> Fixes: 31ad4e4ee1e4 ("ice: Allocate flow profile")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>

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

end of thread, other threads:[~2020-06-04 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 12:12 [PATCH net-next] ice: Fix error return code in ice_add_prof() Wei Yongjun
2020-05-01  3:29 ` David Miller
2020-06-04 19:16 ` [Intel-wired-lan] " Bowers, AndrewX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).