Commit 49e190ec authored by kbuild test robot's avatar kbuild test robot Committed by Radim Krčmář
Browse files

PTP: fix ptr_ret.cocci warnings

drivers/ptp/ptp_kvm.c:229:1-3: 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

CC: Marcelo Tosatti <>
Signed-off-by: default avatarFengguang Wu <>
Signed-off-by: default avatarRadim Krčmář <>
parent 3863dff0
......@@ -193,10 +193,7 @@ static int __init ptp_kvm_init(void)
kvm_ptp_clock.ptp_clock = ptp_clock_register(&kvm_ptp_clock.caps, NULL);
if (IS_ERR(kvm_ptp_clock.ptp_clock))
return PTR_ERR(kvm_ptp_clock.ptp_clock);
return 0;
return PTR_ERR_OR_ZERO(kvm_ptp_clock.ptp_clock);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment