From: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
To: Sudip Mukherjee
<sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Jean Delvare <jdelvare-l3A5Bk7waGM@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Rodolfo Giometti
<giometti-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>,
"James E.J. Bottomley"
<JBottomley-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Willy Tarreau <willy-859RlTSWH48dnm+yROfE0A@public.gmane.org>,
Jaroslav Kysela <perex-/Fr2/VpizcU@public.gmane.org>,
Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org
Subject: Re: [PATCH 02/14] ALSA: portman2x4: return proper error values from attach
Date: Wed, 08 Apr 2015 16:32:57 +0300 [thread overview]
Message-ID: <55252E09.2060600@cogentembedded.com> (raw)
In-Reply-To: <1428492040-5581-3-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Hello.
On 4/8/2015 2:20 PM, Sudip Mukherjee wrote:
> now that we are monitoring the return value from attach, make the
So you've first changed the method prototype and follow up with the
changes to the actual implementations? That's backward. I'm afraid such
changes can't be done piecemeal.
> required changes to return proper value from its attach function.
> Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
> ---
> sound/drivers/portman2x4.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
> diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
> index 464385a..866adbb 100644
> --- a/sound/drivers/portman2x4.c
> +++ b/sound/drivers/portman2x4.c
> @@ -672,32 +672,37 @@ static int snd_portman_probe_port(struct parport *p)
> return res ? -EIO : 0;
> }
>
> -static void snd_portman_attach(struct parport *p)
> +static int snd_portman_attach(struct parport *p)
> {
> struct platform_device *device;
> + int ret;
>
> device = platform_device_alloc(PLATFORM_DRIVER, device_count);
> if (!device)
> - return;
> + return -ENOMEM;
>
> /* Temporary assignment to forward the parport */
> platform_set_drvdata(device, p);
>
> - if (platform_device_add(device) < 0) {
> + ret = platform_device_add(device);
> +
I don't think empty line is needed here.
> + if (ret < 0) {
> platform_device_put(device);
> - return;
> + return ret;
> }
>
[...]
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-04-08 13:32 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 11:20 [PATCH 00/14] parport: check success of attach call Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 01/14] parport: return value of attach and parport_register_driver Sudip Mukherjee
2015-04-08 11:38 ` Dan Carpenter
2015-04-08 11:44 ` Dan Carpenter
2015-04-08 12:14 ` Sudip Mukherjee
2015-04-08 11:50 ` Sudip Mukherjee
2015-04-08 12:27 ` Dan Carpenter
2015-04-08 17:56 ` Willy Tarreau
2015-04-08 11:20 ` [PATCH 02/14] ALSA: portman2x4: return proper error values from attach Sudip Mukherjee
[not found] ` <1428492040-5581-3-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-08 13:32 ` Sergei Shtylyov [this message]
2015-04-08 13:40 ` Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 03/14] ALSA: mts64: " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 04/14] staging: panel: " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 05/14] spi: lm70llp: " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 06/14] spi: butterfly: " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 07/14] [SCSI] ppa: " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 08/14] [SCSI] imm: " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 09/14] pps: " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 10/14] " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 11/14] net: plip: " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 12/14] i2c-parport: " Sudip Mukherjee
[not found] ` <1428492040-5581-13-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-09 7:13 ` Wolfram Sang
2015-04-09 9:33 ` Jean Delvare
[not found] ` <20150409113342.5621af83-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2015-04-09 10:25 ` Wolfram Sang
2015-04-10 5:05 ` Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 13/14] ppdev: " Sudip Mukherjee
2015-04-08 11:20 ` [PATCH 14/14] char: lp: " Sudip Mukherjee
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=55252E09.2060600@cogentembedded.com \
--to=sergei.shtylyov-m4dtvfq/zs1mrggop+s0pdbpr1lh4cv8@public.gmane.org \
--cc=JBottomley-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org \
--cc=giometti-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=jdelvare-l3A5Bk7waGM@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=perex-/Fr2/VpizcU@public.gmane.org \
--cc=sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tiwai-l3A5Bk7waGM@public.gmane.org \
--cc=willy-859RlTSWH48dnm+yROfE0A@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).