wlcore: Propagate errors from wl1271_read
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / net / wireless / ti / wlcore / event.c
index c976f04098655b08ad4812ddcbeadc6be0de79e6..858ac33f5980c33c125783aff9ccf21e6987b5ac 100644 (file)
@@ -301,8 +301,10 @@ int wl1271_event_handle(struct wl1271 *wl, u8 mbox_num)
                return -EINVAL;
 
        /* first we read the mbox descriptor */
-       wl1271_read(wl, wl->mbox_ptr[mbox_num], wl->mbox,
-                   sizeof(*wl->mbox), false);
+       ret = wlcore_read(wl, wl->mbox_ptr[mbox_num], wl->mbox,
+                         sizeof(*wl->mbox), false);
+       if (ret < 0)
+               return ret;
 
        /* process the descriptor */
        ret = wl1271_event_process(wl);