mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 03:59:40 +02:00
gunyah: gh_rm_drv: Add error return if RM device is not ready
Some driver may probe before RM driver, so we need return probe defer to let these driver use RM call after RM device is ready. Change-Id: I65cf5eab7b99ca2a58c32f2d83794a210350fb05 Signed-off-by: Cong Zhang <quic_congzhan@quicinc.com>
This commit is contained in:
parent
7f426d2858
commit
34989b4a03
|
|
@ -602,6 +602,12 @@ static int gh_rm_send_request(u32 message_id,
|
|||
void *send_buff;
|
||||
int i, ret;
|
||||
|
||||
/* Drivers need probe defer
|
||||
* when do RM call before RM driver initialized
|
||||
*/
|
||||
if (gh_rm_msgq_desc == NULL)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
num_fragments = (req_buff_size + GH_RM_MAX_MSG_SIZE_BYTES - 1) /
|
||||
GH_RM_MAX_MSG_SIZE_BYTES;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user