mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Vasyl Gomonovych <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: gomonovych@gmail.com, tglx@linutronix.de, peterz@infradead.org,
	hpa@zytor.com, ard.biesheuvel@linaro.org,
	linux-kernel@vger.kernel.org, tbaicar@codeaurora.org,
	arvind.yadav.cs@gmail.com, matt@codeblueprint.co.uk,
	sboyd@codeaurora.org, torvalds@linux-foundation.org,
	mingo@kernel.org
Subject: [tip:efi/core] efi: Use PTR_ERR_OR_ZERO()
Date: Wed, 3 Jan 2018 08:19:58 -0800	[thread overview]
Message-ID: <tip-50342b2e498777df237a40a23eebc02f0935e636@git.kernel.org> (raw)
In-Reply-To: <20180102181042.19074-4-ard.biesheuvel@linaro.org>

Commit-ID:  50342b2e498777df237a40a23eebc02f0935e636
Gitweb:     https://git.kernel.org/tip/50342b2e498777df237a40a23eebc02f0935e636
Author:     Vasyl Gomonovych <gomonovych@gmail.com>
AuthorDate: Tue, 2 Jan 2018 18:10:40 +0000
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 3 Jan 2018 14:03:48 +0100

efi: Use PTR_ERR_OR_ZERO()

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>
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tyler Baicar <tbaicar@codeaurora.org>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20180102181042.19074-4-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.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 557a478..8ce70c2 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

  reply	other threads:[~2018-01-03 16:25 UTC|newest]

Thread overview: 11+ 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 ` [PATCH 1/5] efi/capsule-loader: pr_err() strings should end with newlines 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-03 16:19   ` [tip:efi/core] arm64/efi: Ignore " tip-bot for Ard Biesheuvel
2018-01-02 18:10 ` [PATCH 3/5] efi: Use PTR_ERR_OR_ZERO() Ard Biesheuvel
2018-01-03 16:19   ` tip-bot for Vasyl Gomonovych [this message]
2018-01-02 18:10 ` [PATCH 4/5] efi: move ARM CPER code to new file 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=tip-50342b2e498777df237a40a23eebc02f0935e636@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=gomonovych@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sboyd@codeaurora.org \
    --cc=tbaicar@codeaurora.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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

Powered by JetHome