rpmsg: rdev_init: do not create rpmsg channels before remote is OK
[processor-sdk/open-amp.git] / lib / rpmsg / remote_device.c
index 223e3cce59109fe44eff20469337262a12d35299..9ddfa93c0edb0718e3d254ef5e68a3de23c1492a 100644 (file)
@@ -151,6 +151,9 @@ int rpmsg_rdev_init(struct hil_proc *proc,
                }
        }
 
                }
        }
 
+       if (!rpmsg_rdev_remote_ready(rdev_loc))
+               return RPMSG_ERR_DEV_INIT;
+
        /* Initialize endpoints list */
        metal_list_init(&rdev_loc->rp_endpoints);
 
        /* Initialize endpoints list */
        metal_list_init(&rdev_loc->rp_endpoints);