| .. | .. |
|---|
| 1 | | -// SPDX-Licence-Identifier: GPL-2.0 |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * STMicroelectronics STM32 USB PHY Controller driver |
|---|
| 4 | 4 | * |
|---|
| .. | .. |
|---|
| 327 | 327 | if (IS_ERR(usbphyc->base)) |
|---|
| 328 | 328 | return PTR_ERR(usbphyc->base); |
|---|
| 329 | 329 | |
|---|
| 330 | | - usbphyc->clk = devm_clk_get(dev, 0); |
|---|
| 330 | + usbphyc->clk = devm_clk_get(dev, NULL); |
|---|
| 331 | 331 | if (IS_ERR(usbphyc->clk)) { |
|---|
| 332 | 332 | ret = PTR_ERR(usbphyc->clk); |
|---|
| 333 | 333 | dev_err(dev, "clk get failed: %d\n", ret); |
|---|
| .. | .. |
|---|
| 340 | 340 | return ret; |
|---|
| 341 | 341 | } |
|---|
| 342 | 342 | |
|---|
| 343 | | - usbphyc->rst = devm_reset_control_get(dev, 0); |
|---|
| 343 | + usbphyc->rst = devm_reset_control_get(dev, NULL); |
|---|
| 344 | 344 | if (!IS_ERR(usbphyc->rst)) { |
|---|
| 345 | 345 | reset_control_assert(usbphyc->rst); |
|---|
| 346 | 346 | udelay(2); |
|---|
| .. | .. |
|---|
| 393 | 393 | ret = of_property_read_u32(child, "reg", &index); |
|---|
| 394 | 394 | if (ret || index > usbphyc->nphys) { |
|---|
| 395 | 395 | dev_err(&phy->dev, "invalid reg property: %d\n", ret); |
|---|
| 396 | + if (!ret) |
|---|
| 397 | + ret = -EINVAL; |
|---|
| 396 | 398 | goto put_child; |
|---|
| 397 | 399 | } |
|---|
| 398 | 400 | |
|---|