Re: [PATCH 1/2] [RFC] base: soc: Let soc_device_match() return no match when called too early

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 9, 2017 at 7:18 PM, Geert Uytterhoeven
<geert+renesas@xxxxxxxxx> wrote:
> If soc_device_match() is called before the SoC bus has been registered,
> bus_for_each_dev() returns -EINVAL, which is considered a match, as it
> is non-zero.
>
> While calling soc_device_match() can be considered an integration
> mistake, returning a match is counter-intuitive: soc_device_match() is
> typically used to handle quirks, i.e. to deviate from the default path.
> Hence add a check to abort checking and return no match instead.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>

> Should this use WARN_ONCE()?

I wouldn't mind that either, but your current version seems sufficient.



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux