|
@@ -1781,12 +1781,20 @@ static int wlan_hdd_pld_runtime_suspend(struct device *dev,
|
|
|
|
|
|
errno = osif_psoc_sync_op_start(dev, &psoc_sync);
|
|
|
if (errno)
|
|
|
- return errno;
|
|
|
+ goto out;
|
|
|
|
|
|
errno = wlan_hdd_runtime_suspend(dev);
|
|
|
|
|
|
osif_psoc_sync_op_stop(psoc_sync);
|
|
|
|
|
|
+out:
|
|
|
+ /* If it returns other errno to kernel, it will treat
|
|
|
+ * it as critical issue, so all the future runtime
|
|
|
+ * PM api will return error, pm runtime can't be work
|
|
|
+ * anymore. Such case found in SSR.
|
|
|
+ */
|
|
|
+ if (errno && errno != -EAGAIN && errno != -EBUSY)
|
|
|
+ errno = -EAGAIN;
|
|
|
return errno;
|
|
|
}
|
|
|
|