Missing setting error value if target device can not be found,
which will cause Oops in some cases.
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I5fc7cd376c8c7c276739692c7234ae142b4f6e23
Reviewed-on: http://review.whamcloud.com/2229
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
if (tgt == NULL) {
CERROR("Can not find tgt device %s\n",
lustre_cfg_string(cfg, 1));
- GOTO(out, rc);
+ GOTO(out, rc = -ENODEV);
}
next = tgt->obd_lu_dev;