trusty:storageproxyd: Fix return paths on errors am: c66e99bf24

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/15312384

Change-Id: Ie066257e80ce5ae561b9d19e36e37a2f8ef9b9db
This commit is contained in:
Wenhao Wang 2021-07-16 22:01:29 +00:00 committed by Automerger Merge Worker
commit e94276a234
1 changed files with 4 additions and 0 deletions

View File

@ -212,6 +212,7 @@ static int send_ufs_rpmb_req(int sg_fd, const struct storage_rpmb_send_req* req)
rc = ioctl(sg_fd, SG_IO, &io_hdr);
if (rc < 0) {
ALOGE("%s: ufs ioctl failed: %d, %s\n", __func__, rc, strerror(errno));
goto err_op;
}
write_buf += req->reliable_write_size;
}
@ -225,6 +226,7 @@ static int send_ufs_rpmb_req(int sg_fd, const struct storage_rpmb_send_req* req)
rc = ioctl(sg_fd, SG_IO, &io_hdr);
if (rc < 0) {
ALOGE("%s: ufs ioctl failed: %d, %s\n", __func__, rc, strerror(errno));
goto err_op;
}
write_buf += req->write_size;
}
@ -240,6 +242,8 @@ static int send_ufs_rpmb_req(int sg_fd, const struct storage_rpmb_send_req* req)
ALOGE("%s: ufs ioctl failed: %d, %s\n", __func__, rc, strerror(errno));
}
}
err_op:
return rc;
}