diff mbox

odp_packet_io.c: fix unreachable code

Message ID 1413907336-30415-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit 7e62bb95f564c5e320a3666a3b57e9ad7aa19c63
Headers show

Commit Message

Mike Holmes Oct. 21, 2014, 4:02 p.m. UTC
The code after the break cannot be executed.
If the entry is not free, free it.

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 platform/linux-generic/odp_packet_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maxim Uvarov Oct. 22, 2014, 10:38 a.m. UTC | #1
That looks good. Merged.

Maxim.

On 10/21/2014 08:02 PM, Mike Holmes wrote:
> The code after the break cannot be executed.
> If the entry is not free, free it.
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   platform/linux-generic/odp_packet_io.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
> index 0c30f0f..fb9fe2d 100644
> --- a/platform/linux-generic/odp_packet_io.c
> +++ b/platform/linux-generic/odp_packet_io.c
> @@ -228,8 +228,8 @@ int odp_pktio_close(odp_pktio_t id)
>   			break;
>   		default:
>   			break;
> -		res |= free_pktio_entry(id);
>   		}
> +		res |= free_pktio_entry(id);
>   	}
>   	unlock_entry(entry);
>
diff mbox

Patch

diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 0c30f0f..fb9fe2d 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -228,8 +228,8 @@  int odp_pktio_close(odp_pktio_t id)
 			break;
 		default:
 			break;
-		res |= free_pktio_entry(id);
 		}
+		res |= free_pktio_entry(id);
 	}
 	unlock_entry(entry);