[PATCH] x86: use PTR_ERR_OR_ZERO to fix ptr_ret.cocci warning

2018-07-20 Thread YueHaibing
ptr_ret.cocci warnings: arch/x86/kernel/pcspeaker.c:12:8-14: WARNING: PTR_ERR_OR_ZERO can be used use PTR_ERR_OR_ZERO rather than an open-code version to fix this. Signed-off-by: YueHaibing --- arch/x86/kernel/pcspeaker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arc

Re: [PATCH] x86: Use PTR_ERR_OR_ZERO

2018-07-19 Thread Greg KH
On Thu, Jul 19, 2018 at 09:22:53PM +0800, YueHaibing wrote: > Replace IS_ERR/PTR_ERR That says what you did, not why. Please fix and resend. thanks, greg k-h

[PATCH] x86: Use PTR_ERR_OR_ZERO

2018-07-19 Thread YueHaibing
Replace IS_ERR/PTR_ERR Signed-off-by: YueHaibing --- arch/x86/kernel/pcspeaker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/pcspeaker.c b/arch/x86/kernel/pcspeaker.c index da5190a..4a710ff 100644 --- a/arch/x86/kernel/pcspeaker.c +++ b/arch/x86/kernel/pcs