From: Nishanth Menon <nm@ti.com>
To: "Stefan Sørensen" <stefan.sorensen@spectralink.com>,
linux-omap@vger.kernel.org
Subject: Re: [PATCH] mtd:elm: Use correct check on return value of pm_runtime_get_sync
Date: Wed, 5 Feb 2014 08:17:32 -0600 [thread overview]
Message-ID: <52F247FC.9040505@ti.com> (raw)
In-Reply-To: <1391607760-29826-1-git-send-email-stefan.sorensen@spectralink.com>
-avinash
On 02/05/2014 07:42 AM, Stefan Sørensen wrote:
> The ELM driver incorrectly reagard any non-zero return value from
> pm_runtime_get_sync as an error, but it may return 1 if the device
> was already active. Fix to only error when return value is negative.
>
> Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
> ---
> drivers/mtd/devices/elm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
> index d1dd6a3..e2c073c 100644
> --- a/drivers/mtd/devices/elm.c
> +++ b/drivers/mtd/devices/elm.c
> @@ -380,7 +380,7 @@ static int elm_probe(struct platform_device *pdev)
> }
>
> pm_runtime_enable(&pdev->dev);
> - if (pm_runtime_get_sync(&pdev->dev)) {
> + if (pm_runtime_get_sync(&pdev->dev) < 0) {
> ret = -EINVAL;
> pm_runtime_disable(&pdev->dev);
> dev_err(&pdev->dev, "can't enable clock\n");
>
Though unrelated to specifically this, elm_resume has a get_sync
without error check..
Further, you might want to cc the mailing lists generated by
./scripts/get_maintainer.pl
--
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-02-05 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 13:42 [PATCH] mtd:elm: Use correct check on return value of pm_runtime_get_sync Stefan Sørensen
2014-02-05 14:17 ` Nishanth Menon [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=52F247FC.9040505@ti.com \
--to=nm@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=stefan.sorensen@spectralink.com \
/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).