* [PATCH] efi: Use PTR_ERR_OR_ZERO()
@ 2017-11-28 21:39 Vasyl Gomonovych
2017-12-15 15:06 ` Matt Fleming
0 siblings, 1 reply; 3+ messages in thread
From: Vasyl Gomonovych @ 2017-11-28 21:39 UTC (permalink / raw)
To: matt, ard.biesheuvel, linux-efi; +Cc: linux-kernel, gomonovych
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>
---
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 f70febf680c3..789ba2f60c8a 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -607,7 +607,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
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] efi: Use PTR_ERR_OR_ZERO()
@ 2017-12-15 15:06 ` Matt Fleming
0 siblings, 0 replies; 3+ messages in thread
From: Matt Fleming @ 2017-12-15 15:06 UTC (permalink / raw)
To: Vasyl Gomonovych; +Cc: ard.biesheuvel, linux-efi, linux-kernel
On Tue, 28 Nov, at 10:39:37PM, Vasyl Gomonovych wrote:
> 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>
> ---
> drivers/firmware/efi/efi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks. Applied to the 'next' branch.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] efi: Use PTR_ERR_OR_ZERO()
@ 2017-12-15 15:06 ` Matt Fleming
0 siblings, 0 replies; 3+ messages in thread
From: Matt Fleming @ 2017-12-15 15:06 UTC (permalink / raw)
To: Vasyl Gomonovych
Cc: ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A,
linux-efi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Tue, 28 Nov, at 10:39:37PM, Vasyl Gomonovych wrote:
> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/firmware/efi/efi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks. Applied to the 'next' branch.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-15 15:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-28 21:39 [PATCH] efi: Use PTR_ERR_OR_ZERO() Vasyl Gomonovych
2017-12-15 15:06 ` Matt Fleming
2017-12-15 15:06 ` Matt Fleming
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.