cryptodev: fix crash on null dereference
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Sat, 3 Dec 2016 18:34:01 +0000 (00:04 +0530)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 18 Jan 2017 20:45:15 +0000 (21:45 +0100)
commit53a3ba0c36757cd74bc8411e60aa81c91f679cd3
tree2c59d698d6f054b95220ce47fe317e900ad38359
parentaa8128b1d830dbfcd92636a5fb6038a3b877ffc1
cryptodev: fix crash on null dereference

crypodev->data->name will be null when
rte_cryptodev_get_dev_id() invoked without a valid
crypto device instance.

Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
lib/librte_cryptodev/rte_cryptodev.c