Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: ohci-spear: Remove unnecessary NULL check before clk_disable_unprepare()

clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL.
Remove unneeded NULL check for clk here.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20250617042050.1930940-1-nichen@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Chen Ni and committed by
Greg Kroah-Hartman
a891b9ae 8fa23514

+1 -2
+1 -2
drivers/usb/host/ohci-spear.c
··· 103 103 struct spear_ohci *sohci_p = to_spear_ohci(hcd); 104 104 105 105 usb_remove_hcd(hcd); 106 - if (sohci_p->clk) 107 - clk_disable_unprepare(sohci_p->clk); 106 + clk_disable_unprepare(sohci_p->clk); 108 107 109 108 usb_put_hcd(hcd); 110 109 }