[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vdkp40e5-Bv+LnLBxgPkTDJ0FA1ooq+C4-do=4k5prTiQ@mail.gmail.com>
Date: Mon, 4 Mar 2019 08:50:39 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Chunfeng Yun <chunfeng.yun@...iatek.com>
Cc: Yu Chen <chenyu56@...wei.com>, USB <linux-usb@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
John Stultz <john.stultz@...aro.org>,
Suzhuangluan <suzhuangluan@...ilicon.com>,
Kongfei <kongfei@...ilicon.com>, liuyu712@...ilicon.com,
wanghu17@...ilicon.com, butao@...ilicon.com,
Yao Chen <chenyao11@...wei.com>, fangshengzhou@...ilicon.com,
lipengcheng8@...wei.com, songxiaowei <songxiaowei@...ilicon.com>,
xu yiping <xuyiping@...ilicon.com>, xuyoujun4@...wei.com,
yudongbin@...ilicon.com, zangleigang@...ilicon.com,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Binghui Wang <wangbinghui@...ilicon.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Subject: Re: [PATCH v3 10/12] hikey960: Support usb functionality of Hikey960
On Mon, Mar 4, 2019 at 3:47 AM Chunfeng Yun <chunfeng.yun@...iatek.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
Powered by blists - more mailing lists