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

drm/sun4i: dsi: delete unnecessary IS_ERR() checks

The "dsi->bus_clk" pointer cannot be an error pointer at this point.
The check is confusing and unnecessary. Delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/YmqH71MtoGn2AXUg@kili

authored by

Dan Carpenter and committed by
Maxime Ripard
37f67d39 9030a9e5

+3 -4
+3 -4
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
··· 1193 1193 err_unprotect_clk: 1194 1194 clk_rate_exclusive_put(dsi->mod_clk); 1195 1195 err_attach_clk: 1196 - if (!IS_ERR(dsi->bus_clk)) 1197 - regmap_mmio_detach_clk(dsi->regs); 1196 + regmap_mmio_detach_clk(dsi->regs); 1197 + 1198 1198 return ret; 1199 1199 } 1200 1200 ··· 1207 1207 mipi_dsi_host_unregister(&dsi->host); 1208 1208 clk_rate_exclusive_put(dsi->mod_clk); 1209 1209 1210 - if (!IS_ERR(dsi->bus_clk)) 1211 - regmap_mmio_detach_clk(dsi->regs); 1210 + regmap_mmio_detach_clk(dsi->regs); 1212 1211 1213 1212 return 0; 1214 1213 }