From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: "Christopher Díaz Riveros" <chrisadr@gentoo.org>,
benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
joe@perches.com, christian.koenig@amd.com,
tyreld@linux.vnet.ibm.com, konrad.wilk@oracle.com,
robh@kernel.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH-next] powerpc/fsl_pci: Use PTR_ERR_OR_ZERO
Date: Tue, 23 Jan 2018 19:33:10 -0800 [thread overview]
Message-ID: <dff06bae-9624-b688-2865-99aca16b9214@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180123203752.15057-1-chrisadr@gentoo.org>
On 01/23/2018 12:37 PM, Christopher Díaz Riveros wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org>
> ---
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> arch/powerpc/sysdev/fsl_pci.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
> index cc20d2255d7f..142184635c81 100644
> --- a/arch/powerpc/sysdev/fsl_pci.c
> +++ b/arch/powerpc/sysdev/fsl_pci.c
> @@ -1304,10 +1304,7 @@ static int add_err_dev(struct platform_device *pdev)
> pdev->resource,
> pdev->num_resources,
> &pd, sizeof(pd));
> - if (IS_ERR(errdev))
> - return PTR_ERR(errdev);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(errdev);
> }
>
> static int fsl_pci_probe(struct platform_device *pdev)
>
prev parent reply other threads:[~2018-01-24 3:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 20:37 [PATCH-next] powerpc/fsl_pci: Use PTR_ERR_OR_ZERO Christopher Díaz Riveros
2018-01-24 3:33 ` Tyrel Datwyler [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=dff06bae-9624-b688-2865-99aca16b9214@linux.vnet.ibm.com \
--to=tyreld@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=chrisadr@gentoo.org \
--cc=christian.koenig@amd.com \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).