Skip to content
Commit b4cb7696 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Marc Kleine-Budde
Browse files

can: mcp251x: Use devm_clk_get_optional() to get the input clock



Simplify the code which fetches the input clock by using
devm_clk_get_optional(). This comes with a small functional change: previously
all errors were ignored when platform data is present. Now all errors are
treated as errors. If no input clock is present devm_clk_get_optional() will
return NULL instead of an error which matches the behavior of the old code.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent f6cae800
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment