From: Jon Hunter <jonathanh@nvidia.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
<thierry.reding@gmail.com>, <airlied@linux.ie>,
<swarren@wwwdotorg.org>, <gnurou@gmail.com>, <treding@nvidia.com>
Cc: <dri-devel@lists.freedesktop.org>, <linux-tegra@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] drm/tegra: dpaux: Fix error handling
Date: Mon, 31 Oct 2016 10:14:39 +0000 [thread overview]
Message-ID: <a9b8df12-6643-fe22-e650-23654a2fab77@nvidia.com> (raw)
In-Reply-To: <20161028090945.11573-1-christophe.jaillet@wanadoo.fr>
On 28/10/16 10:09, Christophe JAILLET wrote:
> 'devm_pinctrl_register()' returns an error pointer or a valid handle. So
> checking for NULL here is pointless and can never trigger.
>
> Check the returned value with IS_ERR instead and propagate this value as
> done in the other functions which call 'devm_pinctrl_register()'
>
> Fixes: 0751bb5c44fe ("drm/tegra: dpaux: Add pinctrl support")
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/gpu/drm/tegra/dpaux.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
> index 059f409556d5..2fde44c3a1b3 100644
> --- a/drivers/gpu/drm/tegra/dpaux.c
> +++ b/drivers/gpu/drm/tegra/dpaux.c
> @@ -539,9 +539,9 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
> dpaux->desc.owner = THIS_MODULE;
>
> dpaux->pinctrl = devm_pinctrl_register(&pdev->dev, &dpaux->desc, dpaux);
> - if (!dpaux->pinctrl) {
> + if (IS_ERR(dpaux->pinctrl)) {
> dev_err(&pdev->dev, "failed to register pincontrol\n");
> - return -ENODEV;
> + return PTR_ERR(dpaux->pinctrl);
> }
> #endif
> /* enable and clear all interrupts */
Thanks for the fix!
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Cheers
Jon
--
nvpublic
next prev parent reply other threads:[~2016-10-31 11:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 9:09 Christophe JAILLET
2016-10-31 10:14 ` Jon Hunter [this message]
2016-11-07 12:00 ` Thierry Reding
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=a9b8df12-6643-fe22-e650-23654a2fab77@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=airlied@linux.ie \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dri-devel@lists.freedesktop.org \
--cc=gnurou@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=treding@nvidia.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
all inboxes | Powered by JetHome®