Commit b779bbb
thermal/drivers/brcmstb_thermal: Simplify with dev_err_probe()
dev_err_probe() is used to log an error message during the probe process
of a device.
It can simplify the error path and unify a message template.
Using this helper is totally fine even if err is known to never
be -EPROBE_DEFER.
The benefit compared to a normal dev_err() is the standardized format
of the error code, it being emitted symbolically and the fact that
the error code is returned which allows more compact error paths.
Signed-off-by: Yan Zhen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Lezcano <[email protected]>1 parent 8e12f1f commit b779bbb
1 file changed
+6
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
346 | 344 | | |
347 | 345 | | |
348 | 346 | | |
| |||
352 | 350 | | |
353 | 351 | | |
354 | 352 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
359 | 356 | | |
360 | 357 | | |
361 | 358 | | |
| |||
0 commit comments