lkml.org 
[lkml]   [2019]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960
On Mon, Mar 4, 2019 at 3:47 AM Chunfeng Yun <chunfeng.yun@mediatek.com> wrote:
> On Sat, 2019-03-02 at 17:05 +0800, Yu Chen wrote:

> > + 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.

Am I missing something?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2019-03-04 07:51    [W:0.142 / U:7.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site