bdev/crypto: respect return value of vbdev_crypto_claim()

Found via inspection while invetigating a CI failure. In
vbdev_crypto_examine() we were not looking at the rc from
vbdev_crypto_claim()

Change-Id: I8be09b5844e18e35b95f19e378fe280323d183fa
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/432930
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Paul Luse 2018-11-12 16:52:08 -07:00 committed by Jim Harris
parent 197998ede3
commit d2677013f9

View File

@ -1495,7 +1495,7 @@ vbdev_crypto_claim(struct spdk_bdev *bdev)
goto error_claim; goto error_claim;
} }
SPDK_NOTICELOG("registered crypto_bdev for: %s\n", name->vbdev_name); SPDK_NOTICELOG("registered io_device for: %s\n", name->vbdev_name);
} }
return rc; return rc;
@ -1562,7 +1562,11 @@ vbdev_crypto_examine(struct spdk_bdev *bdev)
struct vbdev_crypto *crypto_bdev, *tmp; struct vbdev_crypto *crypto_bdev, *tmp;
int rc; int rc;
vbdev_crypto_claim(bdev); rc = vbdev_crypto_claim(bdev);
if (rc) {
spdk_bdev_module_examine_done(&crypto_if);
return;
}
TAILQ_FOREACH_SAFE(crypto_bdev, &g_vbdev_crypto, link, tmp) { TAILQ_FOREACH_SAFE(crypto_bdev, &g_vbdev_crypto, link, tmp) {
if (strcmp(crypto_bdev->base_bdev->name, bdev->name) == 0) { if (strcmp(crypto_bdev->base_bdev->name, bdev->name) == 0) {