mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-25 02:54:44 +08:00
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 <mtosatti@redhat.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
This commit is contained in:
parent
3863dff0c3
commit
49e190ec33
@ -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);
|
||||
}
|
||||
|
||||
module_init(ptp_kvm_init);
|
||||
|
Loading…
Reference in New Issue
Block a user