diff mbox

linux-generic: queue: fix pktout_enqueue() logic

Message ID 1441966502-20651-1-git-send-email-stuart.haslam@linaro.org
State Accepted
Commit 8e8bd180aae61ad5c78b77ed3ec384df8277a28b
Headers show

Commit Message

Stuart Haslam Sept. 11, 2015, 10:15 a.m. UTC
Fix inverted logic when checking the return value of pktout_enqueue.

Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
---
 platform/linux-generic/odp_queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bill Fischofer Sept. 11, 2015, 12:11 p.m. UTC | #1
On Fri, Sep 11, 2015 at 5:15 AM, Stuart Haslam <stuart.haslam@linaro.org>
wrote:

> Fix inverted logic when checking the return value of pktout_enqueue.
>
> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
>

Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  platform/linux-generic/odp_queue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/platform/linux-generic/odp_queue.c
> b/platform/linux-generic/odp_queue.c
> index 99a663d..95a2df8 100644
> --- a/platform/linux-generic/odp_queue.c
> +++ b/platform/linux-generic/odp_queue.c
> @@ -758,7 +758,7 @@ int queue_pktout_enq(queue_entry_t *queue,
> odp_buffer_hdr_t *buf_hdr,
>                         return -1;
>         } else {
>                 rc = pktout_enqueue(queue, buf_hdr);
> -               if (!rc)
> +               if (rc)
>                         return rc;
>         }
>
> --
> 2.1.1
>
>
Maxim Uvarov Sept. 14, 2015, 9:57 a.m. UTC | #2
Merged,
Maxim.

On 09/11/15 15:11, Bill Fischofer wrote:
>
>
> On Fri, Sep 11, 2015 at 5:15 AM, Stuart Haslam 
> <stuart.haslam@linaro.org <mailto:stuart.haslam@linaro.org>> wrote:
>
>     Fix inverted logic when checking the return value of pktout_enqueue.
>
>     Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org
>     <mailto:stuart.haslam@linaro.org>>
>
>
> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org 
> <mailto:bill.fischofer@linaro.org>>
>
>     ---
>      platform/linux-generic/odp_queue.c | 2 +-
>      1 file changed, 1 insertion(+), 1 deletion(-)
>
>     diff --git a/platform/linux-generic/odp_queue.c
>     b/platform/linux-generic/odp_queue.c
>     index 99a663d..95a2df8 100644
>     --- a/platform/linux-generic/odp_queue.c
>     +++ b/platform/linux-generic/odp_queue.c
>     @@ -758,7 +758,7 @@ int queue_pktout_enq(queue_entry_t *queue,
>     odp_buffer_hdr_t *buf_hdr,
>                             return -1;
>             } else {
>                     rc = pktout_enqueue(queue, buf_hdr);
>     -               if (!rc)
>     +               if (rc)
>                             return rc;
>             }
>
>     --
>     2.1.1
>
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index 99a663d..95a2df8 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -758,7 +758,7 @@  int queue_pktout_enq(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr,
 			return -1;
 	} else {
 		rc = pktout_enqueue(queue, buf_hdr);
-		if (!rc)
+		if (rc)
 			return rc;
 	}