From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Ian Lartey <ian@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC: wm8804: fix error handling code
Date: Mon, 11 Oct 2010 12:00:15 +0000 [thread overview]
Message-ID: <20101011120014.GJ9231@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1286731745-18169-1-git-send-email-segooon@gmail.com>
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@gmail.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, and the kzalloc() changes
were already applied from a patch by someone else. 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?
next prev parent reply other threads:[~2010-10-11 12:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-10 17:29 [PATCH] ASoC: wm8804: fix error handling code Vasiliy Kulikov
2010-10-11 12:00 ` Mark Brown [this message]
2010-10-11 12:15 ` Vasiliy Kulikov
2010-10-11 12:36 ` Mark Brown
2010-10-11 12:50 ` Vasiliy Kulikov
2010-10-11 12:59 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101011120014.GJ9231@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=dp@opensource.wolfsonmicro.com \
--cc=ian@opensource.wolfsonmicro.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=segooon@gmail.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox