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]
Date:	Tue, 19 May 2015 18:02:54 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Greg KH <gregkh@...uxfoundation.org>,
	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	Jean Delvare <jdelvare@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 WIP 5/5] paride: use new parport device model

On Tue, May 19, 2015 at 02:32:55PM +0300, Dan Carpenter wrote:
> On Wed, May 06, 2015 at 03:46:17PM +0530, Sudip Mukherjee wrote:
> > +void *pi_register_driver(char *name)
> > +{
> > +	struct parport_driver *parp_drv;
> > +	int ret;
> > +
> > +	parp_drv = kzalloc(sizeof(*parp_drv), GFP_KERNEL);
> > +	if (!parp_drv)
> > +		return NULL;
> > +
> > +	parp_drv->name = name;
> > +	parp_drv->probe = pi_probe;
> > +
> > +	ret = parport_register_driver(parp_drv);
> > +
> > +	if (ret)
> > +		return NULL;
> 
> Remove the blank line between the call and the error handling.  We
> should probably free parp_drv on error.
yes, i missed that. will add it in the patch.
> 
> > +	return (void *)parp_drv;
> > +}
<snip>
> >  	k = 0;
> >  	if (pcd_drive_count == 0) { /* nothing spec'd - so autoprobe for 1 */
> >  		cd = pcd;
> > @@ -723,6 +730,7 @@ static int pcd_detect(void)
> >  	printk("%s: No CD-ROM drive found\n", name);
> >  	for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++)
> >  		put_disk(cd->disk);
> > +	pi_unregister_driver(par_drv);
> 
> You didn't introduce this, but I think the error handling here is broken
> for the autoprobe case.  The autoprobe case doesn't have a for loop.
ok, will fix it afterwards in a later patch. Alan has the hardware,
and I hope he will check that later patch also, like he tested this one.

Thanks again Alan.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ