mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
serial: sh-sci: Use dev_err_probe()
Use the dev_err_probe() helper to streamline error handling. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/5c4dd8df1f8d0d14786f26ee80b77f3eb8e06cd5.1639663832.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
09c7bda4dd
commit
0d1bc829a7
|
|
@ -2790,15 +2790,12 @@ static int sci_init_clocks(struct sci_port *sci_port, struct device *dev)
|
|||
* global "peripheral_clk" clock.
|
||||
*/
|
||||
clk = devm_clk_get(dev, "peripheral_clk");
|
||||
if (!IS_ERR(clk))
|
||||
goto found;
|
||||
|
||||
dev_err(dev, "failed to get %s (%ld)\n", clk_names[i],
|
||||
PTR_ERR(clk));
|
||||
return PTR_ERR(clk);
|
||||
if (IS_ERR(clk))
|
||||
return dev_err_probe(dev, PTR_ERR(clk),
|
||||
"failed to get %s\n",
|
||||
clk_names[i]);
|
||||
}
|
||||
|
||||
found:
|
||||
if (IS_ERR(clk))
|
||||
dev_dbg(dev, "failed to get %s (%ld)\n", clk_names[i],
|
||||
PTR_ERR(clk));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user