Commit bf900c8
ASoC: codecs: rt5660: Simplify mclk initialization
Most of clk_xxx() functions do check if provided clk-pointer is
non-NULL. These do not check if the pointer is an error-pointer.
Providing such to a clk_xxx() results in a panic.
By utilizing _optional() variant of devm_clk_get() the driver code is
both simplified and more robust. There is no need to remember about
IS_ERR(clk) checks each time mclk is accessed.
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240221152516.852353-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 6413849 commit bf900c8
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1079 | 1079 | | |
1080 | 1080 | | |
1081 | 1081 | | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | 1082 | | |
1086 | 1083 | | |
1087 | 1084 | | |
| |||
1277 | 1274 | | |
1278 | 1275 | | |
1279 | 1276 | | |
1280 | | - | |
1281 | | - | |
1282 | | - | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
1283 | 1280 | | |
1284 | 1281 | | |
1285 | 1282 | | |
| |||
0 commit comments