When cl_env_get() fails with an error return the error.
Test-Parameters: trivial
Cray-bug-id: LUS-7310
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: Ia065aeb142a772f4d620b84111af423e27c06b90
Reviewed-on: https://review.whamcloud.com/35229
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
/* obtain new environment */
sub->sub_env = cl_env_get(&sub->sub_refcheck);
- if (IS_ERR(sub->sub_env))
+ if (IS_ERR(sub->sub_env)) {
result = PTR_ERR(sub->sub_env);
+ RETURN(result);
+ }
sub_obj = lovsub2cl(lov_r0(lov, index)->lo_sub[stripe]);
sub_io = &sub->sub_io;