mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
UPSTREAM: soc: qcom: qmi: Return EPROBE_DEFER if no address family
If a client comes up early in the boot process (perhaps was a built-in driver), qmi_handle_init() will likely fail with a EAFNOSUPPORT since the underlying ipc router hasn't init'd and registered the address family. This should not be a fatal error since chances are, the router will come up later, so recode the error to EPROBE_DEFER so that clients will retry later. Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com> Link: https://lore.kernel.org/r/20191106230511.1290-1-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> (cherry picked from commit 52af26e33e700158e6549f1465fcf9da099fabfa) Signed-off-by: John Stultz <john.stultz@linaro.org> Change-Id: I26a0dabe9b1f3b8e9cc793f7f52ee8f658ecdce3
This commit is contained in:
parent
240e180bd8
commit
2d00c82d25
1 changed files with 6 additions and 2 deletions
|
|
@ -655,8 +655,12 @@ int qmi_handle_init(struct qmi_handle *qmi, size_t recv_buf_size,
|
|||
|
||||
qmi->sock = qmi_sock_create(qmi, &qmi->sq);
|
||||
if (IS_ERR(qmi->sock)) {
|
||||
pr_err("failed to create QMI socket\n");
|
||||
ret = PTR_ERR(qmi->sock);
|
||||
if (PTR_ERR(qmi->sock) == -EAFNOSUPPORT) {
|
||||
ret = -EPROBE_DEFER;
|
||||
} else {
|
||||
pr_err("failed to create QMI socket\n");
|
||||
ret = PTR_ERR(qmi->sock);
|
||||
}
|
||||
goto err_destroy_wq;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue