Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1351673 > unrolled thread
| Started by | Ariel Elior <Ariel.Elior@qlogic.com> |
|---|---|
| First post | 2016-03-07 16:00 +0100 |
| Last post | 2016-03-07 16:00 +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.
RE: [PATCH 1/2] bnx2x:Fix error handling for the function bnx2x_set_mutl_gpio Ariel Elior <Ariel.Elior@qlogic.com> - 2016-03-07 16:00 +0100
| From | Ariel Elior <Ariel.Elior@qlogic.com> |
|---|---|
| Date | 2016-03-07 16:00 +0100 |
| Subject | RE: [PATCH 1/2] bnx2x:Fix error handling for the function bnx2x_set_mutl_gpio |
| Message-ID | <ra4NA-49R-19@gated-at.bofh.it> |
> -----Original Message----- > From: Nicholas Krause [mailto:xerofoify@gmail.com] > Sent: Monday, March 07, 2016 4:05 AM > To: Ariel Elior <Ariel.Elior@qlogic.com> > Cc: netdev <netdev@vger.kernel.org>; linux-kernel <linux-kernel@vger.kernel.org> > Subject: [PATCH 1/2] bnx2x:Fix error handling for the function bnx2x_set_mutl_gpio > > This fixes the error handling for the function bnx2x_set_mutl_gpio > for checking if the function bnx2x_acquire_hw_lock ran successfully > by not returning a error code and if it does return the error code > to this function's caller in addition to exiting from this function > immediately due to this failure. > > Signed-off-by: Nicholas Krause <xerofoify@gmail.com> > --- > drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c > b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c > index c27af12..a55f1c2 100644 > --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c > +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c > @@ -2151,7 +2151,9 @@ int bnx2x_set_mult_gpio(struct bnx2x *bp, u8 pins, u32 > mode) > > /* Any port swapping should be handled by caller. */ > > - bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_GPIO); > + rc = bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_GPIO); > + if (rc) > + return rc; > /* read GPIO and mask except the float bits */ > gpio_reg = REG_RD(bp, MISC_REG_GPIO); > gpio_reg &= ~(pins << MISC_REGISTERS_GPIO_FLOAT_POS); > -- > 2.1.4 Thanks Nicholas. Acked-by: Ariel Elior <ariel.elior@qlogic.com>
Back to top | Article view | linux.kernel
csiph-web