The value of ec_mdata cannot be NULL, instead check that value of
private_data_offset was set.
Coverity issue: 378861, 378865
Fixes: 97ebfda82910 ("crypto/cnxk: add event metadata set operation")
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
uint8_t cdev_id;
uint16_t qp_id;
+ if (unlikely(op->private_data_offset == 0))
+ return -EINVAL;
ec_mdata = (union rte_event_crypto_metadata *)
((uint8_t *)op + op->private_data_offset);
- if (!ec_mdata)
- return -EINVAL;
rsp_info = &ec_mdata->response_info;
cdev_id = ec_mdata->request_info.cdev_id;
qp_id = ec_mdata->request_info.queue_pair_id;
uint8_t cdev_id;
uint16_t qp_id;
+ if (unlikely(op->private_data_offset == 0))
+ return -EINVAL;
ec_mdata = (union rte_event_crypto_metadata *)
((uint8_t *)op + op->private_data_offset);
- if (!ec_mdata)
- return -EINVAL;
rsp_info = &ec_mdata->response_info;
cdev_id = ec_mdata->request_info.cdev_id;
qp_id = ec_mdata->request_info.queue_pair_id;