| .. | .. |
|---|
| 413 | 413 | usleep_range(30000, 30005); |
|---|
| 414 | 414 | loop--; |
|---|
| 415 | 415 | } |
|---|
| 416 | + |
|---|
| 416 | 417 | if (val != DEVICE_ID) { |
|---|
| 417 | 418 | dev_err(dev, "Device with ID register %x is not rt5682\n", val); |
|---|
| 418 | | - return -ENODEV; |
|---|
| 419 | + ret = -ENODEV; |
|---|
| 420 | + goto err_nodev; |
|---|
| 419 | 421 | } |
|---|
| 420 | 422 | |
|---|
| 421 | 423 | rt5682_calibrate(rt5682); |
|---|
| .. | .. |
|---|
| 486 | 488 | rt5682->hw_init = true; |
|---|
| 487 | 489 | rt5682->first_hw_init = true; |
|---|
| 488 | 490 | |
|---|
| 491 | +err_nodev: |
|---|
| 489 | 492 | pm_runtime_mark_last_busy(&slave->dev); |
|---|
| 490 | 493 | pm_runtime_put_autosuspend(&slave->dev); |
|---|
| 491 | 494 | |
|---|
| 492 | | - dev_dbg(&slave->dev, "%s hw_init complete\n", __func__); |
|---|
| 495 | + dev_dbg(&slave->dev, "%s hw_init complete: %d\n", __func__, ret); |
|---|
| 493 | 496 | |
|---|
| 494 | 497 | return ret; |
|---|
| 495 | 498 | } |
|---|