All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larysa Zaremba <larysa.zaremba@intel.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: netdev@vger.kernel.org, jesse.brandeburg@intel.com,
	edumazet@google.com, anthony.l.nguyen@intel.com, kuba@kernel.org,
	intel-wired-lan@lists.osuosl.org, pabeni@redhat.com,
	liwei391@huawei.com, davem@davemloft.net
Subject: Re: [Intel-wired-lan] [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def()
Date: Fri, 17 Feb 2023 13:07:32 +0100	[thread overview]
Message-ID: <Y+9uBAXtjvWBZVcG@lincoln> (raw)
In-Reply-To: <20230217093625.420984-1-yangyingliang@huawei.com>

On Fri, Feb 17, 2023 at 05:36:25PM +0800, Yang Yingliang wrote:
> Set the error code when ice_vsi_alloc_stat_arrays()
> or ice_vsi_get_qs() fails in ice_vsi_cfg_def().
> 
> Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")

Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 37fe639712e6..766edff0d638 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -2692,12 +2692,14 @@ ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vsi_cfg_params *params)
>  		return ret;
>  
>  	/* allocate memory for Tx/Rx ring stat pointers */
> -	if (ice_vsi_alloc_stat_arrays(vsi))
> +	ret = ice_vsi_alloc_stat_arrays(vsi);
> +	if (ret)
>  		goto unroll_vsi_alloc;
>  
>  	ice_alloc_fd_res(vsi);
>  
> -	if (ice_vsi_get_qs(vsi)) {
> +	ret = ice_vsi_get_qs(vsi);
> +	if (ret) {
>  		dev_err(dev, "Failed to allocate queues. vsi->idx = %d\n",
>  			vsi->idx);
>  		goto unroll_vsi_alloc_stat;
> -- 
> 2.25.1
> 
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

WARNING: multiple messages have this Message-ID (diff)
From: Larysa Zaremba <larysa.zaremba@intel.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: <netdev@vger.kernel.org>, <intel-wired-lan@lists.osuosl.org>,
	<jesse.brandeburg@intel.com>, <anthony.l.nguyen@intel.com>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <jacob.e.keller@intel.com>,
	<michal.swiatkowski@linux.intel.com>, <liwei391@huawei.com>
Subject: Re: [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def()
Date: Fri, 17 Feb 2023 13:07:32 +0100	[thread overview]
Message-ID: <Y+9uBAXtjvWBZVcG@lincoln> (raw)
In-Reply-To: <20230217093625.420984-1-yangyingliang@huawei.com>

On Fri, Feb 17, 2023 at 05:36:25PM +0800, Yang Yingliang wrote:
> Set the error code when ice_vsi_alloc_stat_arrays()
> or ice_vsi_get_qs() fails in ice_vsi_cfg_def().
> 
> Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions")

Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>

> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 37fe639712e6..766edff0d638 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -2692,12 +2692,14 @@ ice_vsi_cfg_def(struct ice_vsi *vsi, struct ice_vsi_cfg_params *params)
>  		return ret;
>  
>  	/* allocate memory for Tx/Rx ring stat pointers */
> -	if (ice_vsi_alloc_stat_arrays(vsi))
> +	ret = ice_vsi_alloc_stat_arrays(vsi);
> +	if (ret)
>  		goto unroll_vsi_alloc;
>  
>  	ice_alloc_fd_res(vsi);
>  
> -	if (ice_vsi_get_qs(vsi)) {
> +	ret = ice_vsi_get_qs(vsi);
> +	if (ret) {
>  		dev_err(dev, "Failed to allocate queues. vsi->idx = %d\n",
>  			vsi->idx);
>  		goto unroll_vsi_alloc_stat;
> -- 
> 2.25.1
> 

  reply	other threads:[~2023-02-17 12:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17  9:36 [Intel-wired-lan] [PATCH net-next] ice: fix error return code in ice_vsi_cfg_def() Yang Yingliang
2023-02-17  9:36 ` Yang Yingliang
2023-02-17 12:07 ` Larysa Zaremba [this message]
2023-02-17 12:07   ` Larysa Zaremba
2023-02-17 16:54 ` [Intel-wired-lan] " Tony Nguyen
2023-02-17 16:54   ` Tony Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y+9uBAXtjvWBZVcG@lincoln \
    --to=larysa.zaremba@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=liwei391@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.