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] [day] [month] [year] [list]
Date:   Mon, 24 May 2021 09:14:18 +0200
From:   Lubomir Rintel <lkundrak@...sk>
To:     nizamhaider786@...il.com
Cc:     arnd@...db.de, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] char: pcmcia: scr24x_cs: Fix failure handling
 Handled failure cases of pcmcia_enable_device() and device_create()

> Subject: Re: [PATCH 1/2] char: pcmcia: scr24x_cs: Fix failure handling
>  Handled failure cases of pcmcia_enable_device() and device_create()

Here you also manaded to squish the subject line and the patch
description together. Please break them into two.

On Sun, May 23, 2021 at 08:41:10PM +0530, nizamhaider786@...il.com wrote:
> From: Nijam Haider <nizamhaider786@...il.com>
> 
> Signed-off-by: Nijam Haider <nizamhaider786@...il.com>
> ---
>  drivers/char/pcmcia/scr24x_cs.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/char/pcmcia/scr24x_cs.c b/drivers/char/pcmcia/scr24x_cs.c
> index 47feb39..cad1990 100644
> --- a/drivers/char/pcmcia/scr24x_cs.c
> +++ b/drivers/char/pcmcia/scr24x_cs.c
> @@ -233,6 +233,7 @@ static int scr24x_probe(struct pcmcia_device *link)
>  {
>  	struct scr24x_dev *dev;
>  	int ret;
> +       struct device *dev_ret;

Looks like a whitespace error here?

>  	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
>  	if (!dev)
> @@ -272,12 +273,20 @@ static int scr24x_probe(struct pcmcia_device *link)
>  
>  	ret = pcmcia_enable_device(link);
>  	if (ret < 0) {
> +	        cdev_del(&dev->c_dev);

Also here? (a tab followed by spaces).

>  		pcmcia_disable_device(link);
>  		goto err;
>  	}
>  
> -	device_create(scr24x_class, NULL, MKDEV(MAJOR(scr24x_devt), dev->devno),
> +	dev_ret = device_create(scr24x_class, NULL, MKDEV(MAJOR(scr24x_devt), dev->devno),
>  		      NULL, "scr24x%d", dev->devno);
> +        if (IS_ERR(dev_ret)) {
> +                printk(KERN_ERR "device_create failed for %d\n",
> +                               dev->devno);
> +                cdev_del(&dev->c_dev);
> +                pcmcia_disable_device(link);
> +                goto err;
> +       }

...and also here.

In general, please try keeping the formatting consistent with the rest of
the file. Indentation is generally done with tabs.

>  	dev_info(&link->dev, "SCR24x Chip Card Interface\n");
>  	return 0;

Thank you,
Lubo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ