From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: mjg@redhat.com, platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] intel_mid_powerbtn: add power button driver for Medfield platform
Date: Wed, 26 Jan 2011 09:06:04 -0800 [thread overview]
Message-ID: <20110126170604.GC29168@core.coreip.homeip.net> (raw)
In-Reply-To: <20110126094112.15314.79789.stgit@bob.linux.org.uk>
On Wed, Jan 26, 2011 at 09:57:16AM +0000, Alan Cox wrote:
> +
> + ret = request_threaded_irq(priv->irq, NULL, mfld_pb_isr,
> + 0, DRIVER_NAME, priv);
> + if (ret) {
> + dev_err(&pdev->dev,
> + "unable to request irq %d for mfld power button\n",
> + irq);
> + goto fail;
> + }
> +
> + ret = input_register_device(input);
> + if (ret == 0)
> + return 0;
> +
> + dev_err(&pdev->dev, "unable to register input dev, error %d\n", ret);
> + free_irq(priv->irq, priv);
> +
> +fail:
> + platform_set_drvdata(pdev, NULL);
> + input_free_device(input);
> + kfree(priv);
> + return ret;
> +}
> +
Ugh, mixing 2 styles of error handling like this is not the best idea
IMO. Could you please adjust so that all error handling branches out of
line, like virtually every other driver we have in the tree?
Thanks.
--
Dmitry
prev parent reply other threads:[~2011-01-26 17:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 9:57 [PATCH] intel_mid_powerbtn: add power button driver for Medfield platform Alan Cox
2011-01-26 17:06 ` Dmitry Torokhov [this message]
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=20110126170604.GC29168@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.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