]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
usb: fsl-mph-dr-of: Remove unnecessary NULL check before clk_disable_unprepare()
authorChen Ni <nichen@iscas.ac.cn>
Tue, 17 Jun 2025 04:19:17 +0000 (12:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 10:27:29 +0000 (12:27 +0200)
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>
Link: https://lore.kernel.org/r/20250617041917.1930885-1-nichen@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/fsl-mph-dr-of.c

index 4e67b9471986040735b726d84a1d7ae31b80aca0..edfb635430293a3a2fe2b98a0c76f50c2d4929f9 100644 (file)
@@ -327,8 +327,7 @@ static void fsl_usb2_mpc5121_exit(struct platform_device *pdev)
 
        pdata->regs = NULL;
 
-       if (pdata->clk)
-               clk_disable_unprepare(pdata->clk);
+       clk_disable_unprepare(pdata->clk);
 }
 
 static struct fsl_usb2_platform_data fsl_usb2_mpc5121_pd = {