cryptodev: fix checks related to device id