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: <20101011121555.GA32652@albatros>
Date:	Mon, 11 Oct 2010 16:15:55 +0400
From:	Vasiliy Kulikov <segooon@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	kernel-janitors@...r.kernel.org,
	Ian Lartey <ian@...nsource.wolfsonmicro.com>,
	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>,
	Liam Girdwood <lrg@...mlogic.co.uk>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: wm8804: fix error handling code

Hi Mark,

On Mon, Oct 11, 2010 at 13:00 +0100, Mark Brown wrote:
> On Sun, Oct 10, 2010 at 09:29:04PM +0400, Vasiliy Kulikov wrote:
> > kzalloc() returns NULL on error, not ERR_PTR().
> > Also wm8804_modinit() didn't called i2c_del_driver() if
> > spi_register_driver() failed.
> > 
> > Signed-off-by: Vasiliy Kulikov <segooon@...il.com>
> 
> Please try to follow Documentation/SubmittingPatches - in particular,
> you should always split unrelated changes into separate patches.  In
> this case your I2C and kzalloc() changes have nothing to do with each
> other and so should be in separate patches,

Agreed, thanks.

> and the kzalloc() changes
> were already applied from a patch by someone else.

Yes, it was sent by Dan just one day before my patch ;)

> For the registration
> changes...

> > @@ -804,6 +804,7 @@ static int __init wm8804_modinit(void)
> >  	if (ret) {
> >  		printk(KERN_ERR "Failed to register wm8804 I2C driver: %d\n",
> >  		       ret);
> > +		goto err;
> >  	}
> >  #endif
> >  #if defined(CONFIG_SPI_MASTER)
> 
> ...it's not clear to me that this change is an improvement - it'll make
> the driver more fragile in the face of errors, I don't see a benefit in
> refusing to register the variant for one bus if the other fails?

I tried to implement your variant with depca driver in past, but it was
rejected by David Miller:
http://lists.openwall.net/netdev/2010/07/12/9


Thanks,

-- 
Vasiliy
--
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