2013-06-04 14:45:10

by Joe Perches

[permalink] [raw]
Subject: [PATCH 4/4] cw1200: hwio: Remove an unnecessary goto

goto after return is wrong.

The other code in this block needs to set an
error value then goto an error release block.

This one doesn't need to release anything and
was likely a copy/paste remainder.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/net/wireless/cw1200/hwio.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/cw1200/hwio.c b/drivers/net/wireless/cw1200/hwio.c
index 142f45ef..dad3fb3 100644
--- a/drivers/net/wireless/cw1200/hwio.c
+++ b/drivers/net/wireless/cw1200/hwio.c
@@ -178,7 +178,6 @@ int cw1200_indirect_read(struct cw1200_common *priv, u32 addr, void *buf,
if ((buf_len / 2) >= 0x1000) {
pr_err("Can't read more than 0xfff words.\n");
return -EINVAL;
- goto out;
}

priv->hwbus_ops->lock(priv->hwbus_priv);
--
1.8.1.2.459.gbcd45b4.dirty



2013-06-04 15:09:26

by Solomon Peachy

[permalink] [raw]
Subject: Re: [PATCH 4/4] cw1200: hwio: Remove an unnecessary goto

On Tue, Jun 04, 2013 at 07:44:50AM -0700, Joe Perches wrote:
> goto after return is wrong.
>
> The other code in this block needs to set an
> error value then goto an error release block.
>
> This one doesn't need to release anything and
> was likely a copy/paste remainder.
>
> Signed-off-by: Joe Perches <[email protected]>

Acked-By: Solomon Peachy <[email protected]>

> ---
> drivers/net/wireless/cw1200/hwio.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/wireless/cw1200/hwio.c b/drivers/net/wireless/cw1200/hwio.c
> index 142f45ef..dad3fb3 100644
> --- a/drivers/net/wireless/cw1200/hwio.c
> +++ b/drivers/net/wireless/cw1200/hwio.c
> @@ -178,7 +178,6 @@ int cw1200_indirect_read(struct cw1200_common *priv, u32 addr, void *buf,
> if ((buf_len / 2) >= 0x1000) {
> pr_err("Can't read more than 0xfff words.\n");
> return -EINVAL;
> - goto out;
> }
>
> priv->hwbus_ops->lock(priv->hwbus_priv);
> --
> 1.8.1.2.459.gbcd45b4.dirty
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Solomon Peachy pizza at shaftnet dot org
Delray Beach, FL ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum viditur.


Attachments:
(No filename) (1.32 kB)
(No filename) (190.00 B)
Download all attachments