Commit e2aa250
i2c: riic: Use dev_err_probe in probe and riic_init_hw functions
Refactor error handling in the riic_i2c_probe() and riic_init_hw()
functions by replacing multiple dev_err() calls with dev_err_probe().
Additionally, update the riic_init_hw() function to use a local `dev`
pointer instead of `riic->adapter.dev` for dev_err_probe(), as the I2C
adapter is not initialized at this stage. Drop the cast to (unsigned long)
in the riic_init_hw() function when printing the bus frequency, and update
the error message to display the frequency in Hz, improving clarity.
Signed-off-by: Lad Prabhakar <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
Tested-by: Claudiu Beznea <[email protected]>
Reviewed-by: Claudiu Beznea <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>1 parent 76dc162 commit e2aa250
1 file changed
+9
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
364 | 362 | | |
365 | 363 | | |
366 | 364 | | |
| |||
445 | 443 | | |
446 | 444 | | |
447 | 445 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
452 | 449 | | |
453 | 450 | | |
454 | 451 | | |
| |||
472 | 469 | | |
473 | 470 | | |
474 | 471 | | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
479 | 475 | | |
480 | 476 | | |
481 | 477 | | |
| |||
0 commit comments