Thread (34 messages) 34 messages, 7 authors, 2019-03-13

Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960

From: Chunfeng Yun <chunfeng.yun@mediatek.com>
Date: 2019-03-04 06:58:12
Also in: linux-usb, lkml

hi,

On Mon, 2019-03-04 at 08:50 +0200, Andy Shevchenko wrote:
On Mon, Mar 4, 2019 at 3:47 AM Chunfeng Yun [off-list ref] wrote:
quoted
On Sat, 2019-03-02 at 17:05 +0800, Yu Chen wrote:
quoted
quoted
+     hisi_hikey_usb->role_sw = usb_role_switch_get(dev);
+     if (!hisi_hikey_usb->role_sw)
+             return -EPROBE_DEFER;
Here return EPROBE_DEFFER means the related device_connection is
registered after this probe is called, right?
if not, use IS_ERR_OR_NULL then return PTR_ERR is enough
How enough? If return value is NULL it would be transformered to 0,
which is success return code from the ->probe() which means we will
have ->probed() and not functional device.
You are right:)
Am I missing something?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help