From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: linux-efi@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H . Peter Anvin" <hpa@zytor.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
linux-kernel@vger.kernel.org,
Arvind Yadav <arvind.yadav.cs@gmail.com>,
Matt Fleming <matt@codeblueprint.co.uk>,
Stephen Boyd <sboyd@codeaurora.org>,
Tyler Baicar <tbaicar@codeaurora.org>,
Vasyl Gomonovych <gomonovych@gmail.com>
Subject: [PATCH 3/5] efi: Use PTR_ERR_OR_ZERO()
Date: Tue, 2 Jan 2018 18:10:40 +0000 [thread overview]
Message-ID: <20180102181042.19074-4-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20180102181042.19074-1-ard.biesheuvel@linaro.org>
From: Vasyl Gomonovych <gomonovych@gmail.com>
Fix ptr_ret.cocci warnings:
drivers/firmware/efi/efi.c:610:8-14: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
drivers/firmware/efi/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 557a47829d03..8ce70c2e73d5 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -608,7 +608,7 @@ static int __init efi_load_efivars(void)
return 0;
pdev = platform_device_register_simple("efivars", 0, NULL, 0);
- return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
+ return PTR_ERR_OR_ZERO(pdev);
}
device_initcall(efi_load_efivars);
#endif
--
2.11.0
next prev parent reply other threads:[~2018-01-02 18:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 18:10 [GIT PULL 0/5] EFI updates for v4.16 Ard Biesheuvel
2018-01-02 18:10 ` Ard Biesheuvel
2018-01-02 18:10 ` [PATCH 1/5] efi/capsule-loader: pr_err() strings should end with newlines Ard Biesheuvel
2018-01-02 18:10 ` Ard Biesheuvel
2018-01-03 16:19 ` [tip:efi/core] efi/capsule-loader: Fix pr_err() string to end with newline tip-bot for Arvind Yadav
2018-01-02 18:10 ` [PATCH 2/5] arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set Ard Biesheuvel
2018-01-02 18:10 ` Ard Biesheuvel
2018-01-03 16:19 ` [tip:efi/core] arm64/efi: Ignore " tip-bot for Ard Biesheuvel
2018-01-02 18:10 ` Ard Biesheuvel [this message]
2018-01-03 16:19 ` [tip:efi/core] efi: Use PTR_ERR_OR_ZERO() tip-bot for Vasyl Gomonovych
2018-01-02 18:10 ` [PATCH 4/5] efi: move ARM CPER code to new file Ard Biesheuvel
2018-01-02 18:10 ` Ard Biesheuvel
2018-01-03 16:20 ` [tip:efi/core] efi: Move " tip-bot for Tyler Baicar
2018-01-02 18:10 ` [PATCH 5/5] efi: parse ARM error information value Ard Biesheuvel
2018-01-03 16:21 ` [tip:efi/core] efi: Parse " tip-bot for Tyler Baicar
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=20180102181042.19074-4-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=arvind.yadav.cs@gmail.com \
--cc=gomonovych@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=tbaicar@codeaurora.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.