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

Configure Feed

Select the types of activity you want to include in your feed.

usb: host: Do not check priv->clks[clk]

There is no need to check the entries in priv->clks[] array before passing
it to clk_disable_unprepare() as the clk_disable_unprepare() already
check if it receives a NULL or error pointer as argument. Remove this
check. This makes the code simpler.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20251106143625.3050119-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Claudiu Beznea and committed by
Greg Kroah-Hartman
a7d5fe02 66371878

+2 -4
+1 -2
drivers/usb/host/ehci-platform.c
··· 112 112 int clk; 113 113 114 114 for (clk = EHCI_MAX_CLKS - 1; clk >= 0; clk--) 115 - if (priv->clks[clk]) 116 - clk_disable_unprepare(priv->clks[clk]); 115 + clk_disable_unprepare(priv->clks[clk]); 117 116 } 118 117 119 118 static struct hc_driver __read_mostly ehci_platform_hc_driver;
+1 -2
drivers/usb/host/ohci-platform.c
··· 69 69 int clk; 70 70 71 71 for (clk = OHCI_MAX_CLKS - 1; clk >= 0; clk--) 72 - if (priv->clks[clk]) 73 - clk_disable_unprepare(priv->clks[clk]); 72 + clk_disable_unprepare(priv->clks[clk]); 74 73 } 75 74 76 75 static struct hc_driver __read_mostly ohci_platform_hc_driver;