cryptodev: fix crash when querying device by name
authorSlawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Fri, 3 Feb 2017 15:55:02 +0000 (16:55 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Fri, 10 Feb 2017 14:57:29 +0000 (15:57 +0100)
commitb75a76d354d06723b3dfd82a0a4e9484081e59dd
tree66a5e89661ca7426e0729f5661fd6f918c1cfa2b
parenta196eda4310eb6b345ef0c22f7da14c8db74be39
cryptodev: fix crash when querying device by name

This patch fixes a segmentation fault in function
rte_cryptodev_devices_get(), due to incorrect driver name path.
It reworks the function to use correct types and clean up
for visibility.

Coverity issue: 141067
Fixes: 38227c0e3ad2 ("cryptodev: retrieve device info")

Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_cryptodev/rte_cryptodev.c
lib/librte_cryptodev/rte_cryptodev.h