Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273081 > unrolled thread

RE: [PATCH] bnx2x:Fix error handling and return statement in the function bnx2x_vf_init

Started byAriel Elior <Ariel.Elior@qlogic.com>
First post2015-11-19 13:20 +0100
Last post2015-11-19 13:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [PATCH] bnx2x:Fix error handling and return statement in the  function bnx2x_vf_init Ariel Elior <Ariel.Elior@qlogic.com> - 2015-11-19 13:20 +0100

#1273081 — RE: [PATCH] bnx2x:Fix error handling and return statement in the function bnx2x_vf_init

FromAriel Elior <Ariel.Elior@qlogic.com>
Date2015-11-19 13:20 +0100
SubjectRE: [PATCH] bnx2x:Fix error handling and return statement in the function bnx2x_vf_init
Message-ID<qwwlY-KP-3@gated-at.bofh.it>
> -----Original Message-----
> From: Nicholas Krause [mailto:xerofoify@gmail.com]
> Sent: Thursday, November 19, 2015 5:31 AM
> To: Ariel Elior <Ariel.Elior@qlogic.com>
> Cc: netdev <netdev@vger.kernel.org>; linux-kernel <linux-kernel@vger.kernel.org>
> Subject: [PATCH] bnx2x:Fix error handling and return statement in the function
> bnx2x_vf_init
> 
> This fixes error handling and the return statement in the function
> bnx2x_vf_init to properly check and return the error code returned
> by the call to the function bnx2x_post_vf_bulletin in order to
> allow callers of bnx2x_vf_init to be properly signaled and be able to
> handle in their own intended error paths if a error code is returned
> by this particular function call.
> 
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> index 9d02734..4434cdb 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> @@ -2087,6 +2087,7 @@ int bnx2x_vf_init(struct bnx2x *bp, struct bnx2x_virtf *vf,
> dma_addr_t *sb_map)
>  {
>  	struct bnx2x_func_init_params func_init = {0};
>  	int i;
> +	int rc;
> 
>  	/* the sb resources are initialized at this point, do the
>  	 * FW/HW initializations
> @@ -2129,9 +2130,9 @@ int bnx2x_vf_init(struct bnx2x *bp, struct bnx2x_virtf *vf,
> dma_addr_t *sb_map)
>  	vf->state = VF_ENABLED;
> 
>  	/* update vf bulletin board */
> -	bnx2x_post_vf_bulletin(bp, vf->index);
> +	rc = bnx2x_post_vf_bulletin(bp, vf->index);
> 
> -	return 0;
> +	return rc;
>  }
> 
>  struct set_vf_state_cookie {
> --
> 2.5.0

Acked-by: Ariel Elior <ariel.elior@qlogic.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web