lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e86534902fce9b82d2a69b7ec24e697b43c9ef6f.camel@igalia.com>
Date:   Tue, 09 Feb 2021 09:40:12 +0100
From:   Samuel Iglesias Gonsálvez 
        <siglesias@...lia.com>
To:     Uwe Kleine-König <uwe@...ine-koenig.org>,
        Jens Taprogge <jens.taprogge@...rogge.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org,
        industrypack-devel@...ts.sourceforge.net
Subject: Re: [Industrypack-devel] [PATCH v1 1/2] ipack: Fail earlier for
 drivers without probe function

Hi Uwe,

Thanks for the patches!

Patch series is,

Acked-by: Samuel Iglesias Gonsalvez <siglesias@...lia.com>

Greg, Would you mind picking this patch series through your char-misc
tree?

Thanks!

Sam

On Sun, 2021-02-07 at 22:55 +0100, Uwe Kleine-König wrote:
> A driver without a probe function isn't useful as it can never be
> used.
> Let registering such a driver fail already instead of failing every
> binding.
> 
> This is only cosmetic as there is no ipack driver without a probe
> function.
> 
> Signed-off-by: Uwe Kleine-König <uwe@...ine-koenig.org>
> ---
>  drivers/ipack/ipack.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c
> index 9267a85fee18..eabc4d08792a 100644
> --- a/drivers/ipack/ipack.c
> +++ b/drivers/ipack/ipack.c
> @@ -64,9 +64,6 @@ static int ipack_bus_probe(struct device *device)
>         struct ipack_device *dev = to_ipack_dev(device);
>         struct ipack_driver *drv = to_ipack_driver(device->driver);
>  
> -       if (!drv->ops->probe)
> -               return -EINVAL;
> -
>         return drv->ops->probe(dev);
>  }
>  
> @@ -252,6 +249,9 @@ EXPORT_SYMBOL_GPL(ipack_bus_unregister);
>  int ipack_driver_register(struct ipack_driver *edrv, struct module
> *owner,
>                           const char *name)
>  {
> +       if (!edrv->ops->probe)
> +               return -EINVAL;
> +
>         edrv->driver.owner = owner;
>         edrv->driver.name = name;
>         edrv->driver.bus = &ipack_bus_type;
> 
> base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ