提交 c0883265 编写于 作者: P Pratiyush Mohan Srivastava 提交者: York Sun

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: NPratiyush Mohan Srivastava <pratiyush.srivastava@freescale.com>
Acked-by: NPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: NYork Sun <york.sun@nxp.com>
上级 52c11d4f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册