diff options
author | Pratiyush Mohan Srivastava <pratiyush.srivastava@freescale.com> | 2015-12-22 16:50:19 +0530 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2016-01-25 08:24:17 -0800 |
commit | c088326597cad019618a98f6fc65bc1dd92eb301 (patch) | |
tree | 121ee6420e6230223882c6d2dd3519f424ae17a1 /drivers/net/fsl-mc/dpio | |
parent | 52c11d4f08ee3028688c1956718594cd47e2f0e2 (diff) | |
download | u-boot-imx-c088326597cad019618a98f6fc65bc1dd92eb301.zip u-boot-imx-c088326597cad019618a98f6fc65bc1dd92eb301.tar.gz u-boot-imx-c088326597cad019618a98f6fc65bc1dd92eb301.tar.bz2 |
drivers: net: fsl_mc: Compare pointer value qbman_swp_mc_start
Current code compares the return pointer of function
qbman_cena_write_start with NULL. Instead the value of the return
pointer should be compared.
Signed-off-by: Pratiyush Mohan Srivastava <pratiyush.srivastava@freescale.com>
Acked-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'drivers/net/fsl-mc/dpio')
-rw-r--r-- | drivers/net/fsl-mc/dpio/qbman_portal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c index 449ff8a..4b64c8a 100644 --- a/drivers/net/fsl-mc/dpio/qbman_portal.c +++ b/drivers/net/fsl-mc/dpio/qbman_portal.c @@ -102,12 +102,14 @@ struct qbman_swp *qbman_swp_init(const struct qbman_swp_desc *d) void *qbman_swp_mc_start(struct qbman_swp *p) { void *ret; + int *return_val; #ifdef QBMAN_CHECKING BUG_ON(p->mc.check != swp_mc_can_start); #endif ret = qbman_cena_write_start(&p->sys, QBMAN_CENA_SWP_CR); #ifdef QBMAN_CHECKING - if (!ret) + return_val = (int *)ret; + if (!(*return_val)) p->mc.check = swp_mc_can_submit; #endif return ret; |