Message ID | 1450936972-5773-1-git-send-email-glen.lee@atmel.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
HI Glen, On Thu, Dec 24, 2015 at 11:32 AM, Glen Lee <glen.lee@atmel.com> wrote: > This patch fixes a bug that return always 0 so it fails every time. > > Fixes: c1af9db78950 ("staging: wilc1000: call linux_sdio_init instead of io_init") > Signed-off-by: Glen Lee <glen.lee@atmel.com> > --- > Changes in v2: separate v1 patch into two patches. > --- > drivers/staging/wilc1000/wilc_sdio.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c > index e961b50..464d27d 100644 > --- a/drivers/staging/wilc1000/wilc_sdio.c > +++ b/drivers/staging/wilc1000/wilc_sdio.c > @@ -614,8 +614,6 @@ static int sdio_init(struct wilc *wilc) > if (!wilc_sdio_init()) { > dev_err(&func->dev, "Failed io init bus...\n"); > return 0; > - } else { > - return 0; > } I think it's better to handle the error case properly when wilc_sdio_init() call fails. > > /** > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -Souptick -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Dec 31, 2015 at 12:19:25AM +0530, Souptick Joarder wrote: > HI Glen, > > On Thu, Dec 24, 2015 at 11:32 AM, Glen Lee <glen.lee@atmel.com> wrote: > > This patch fixes a bug that return always 0 so it fails every time. > > > > Fixes: c1af9db78950 ("staging: wilc1000: call linux_sdio_init instead of io_init") > > Signed-off-by: Glen Lee <glen.lee@atmel.com> > > --- > > Changes in v2: separate v1 patch into two patches. > > --- > > drivers/staging/wilc1000/wilc_sdio.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c > > index e961b50..464d27d 100644 > > --- a/drivers/staging/wilc1000/wilc_sdio.c > > +++ b/drivers/staging/wilc1000/wilc_sdio.c > > @@ -614,8 +614,6 @@ static int sdio_init(struct wilc *wilc) > > if (!wilc_sdio_init()) { > > dev_err(&func->dev, "Failed io init bus...\n"); > > return 0; > > - } else { > > - return 0; > > } > > I think it's better to handle the error case properly when > wilc_sdio_init() call fails. It can't :) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index e961b50..464d27d 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -614,8 +614,6 @@ static int sdio_init(struct wilc *wilc) if (!wilc_sdio_init()) { dev_err(&func->dev, "Failed io init bus...\n"); return 0; - } else { - return 0; } /**
This patch fixes a bug that return always 0 so it fails every time. Fixes: c1af9db78950 ("staging: wilc1000: call linux_sdio_init instead of io_init") Signed-off-by: Glen Lee <glen.lee@atmel.com> --- Changes in v2: separate v1 patch into two patches. --- drivers/staging/wilc1000/wilc_sdio.c | 2 -- 1 file changed, 2 deletions(-)