aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samsung-ipc/device/maguro/maguro_loader.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/samsung-ipc/device/maguro/maguro_loader.c b/samsung-ipc/device/maguro/maguro_loader.c
index 82c1972..565c605 100644
--- a/samsung-ipc/device/maguro/maguro_loader.c
+++ b/samsung-ipc/device/maguro/maguro_loader.c
@@ -481,9 +481,14 @@ static int maguro_send_mps_data(struct ipc_client *client,
mps_fd = open(I9250_MPS_IMAGE_PATH, O_RDONLY);
if (mps_fd < 0) {
ipc_client_log(client, "Error: failed to open MPS data");
+ goto fail;
}
else {
- read(mps_fd, mps_data, I9250_MPS_LENGTH);
+ ret = read(mps_fd, mps_data, I9250_MPS_LENGTH);
+ if (ret < 0) {
+ ipc_client_log(client, "Error: failed to read MPS data\n");
+ goto fail;
+ }
}
if ((ret = maguro_boot_cmd(client, io_data, ReqFlashSetAddress, &addr, 4)) < 0) {