| .. | .. |
|---|
| 166 | 166 | |
|---|
| 167 | 167 | batt->iio_v = devm_iio_channel_get(dev, "voltage"); |
|---|
| 168 | 168 | err = PTR_ERR_OR_ZERO(batt->iio_v); |
|---|
| 169 | | - if (err) { |
|---|
| 170 | | - if (err != -EPROBE_DEFER) |
|---|
| 171 | | - dev_err(dev, "Failed to get voltage iio channel\n"); |
|---|
| 172 | | - return err; |
|---|
| 173 | | - } |
|---|
| 169 | + if (err) |
|---|
| 170 | + return dev_err_probe(dev, err, |
|---|
| 171 | + "Failed to get voltage iio channel\n"); |
|---|
| 174 | 172 | |
|---|
| 175 | 173 | batt->iio_i = devm_iio_channel_get(dev, "current"); |
|---|
| 176 | 174 | err = PTR_ERR_OR_ZERO(batt->iio_i); |
|---|
| 177 | | - if (err) { |
|---|
| 178 | | - if (err != -EPROBE_DEFER) |
|---|
| 179 | | - dev_err(dev, "Failed to get current iio channel\n"); |
|---|
| 180 | | - return err; |
|---|
| 181 | | - } |
|---|
| 175 | + if (err) |
|---|
| 176 | + return dev_err_probe(dev, err, |
|---|
| 177 | + "Failed to get current iio channel\n"); |
|---|
| 182 | 178 | |
|---|
| 183 | 179 | batt->rechargeable_gpio = devm_gpiod_get(dev, "rechargeable", GPIOD_IN); |
|---|
| 184 | 180 | err = PTR_ERR_OR_ZERO(batt->rechargeable_gpio); |
|---|
| 185 | | - if (err) { |
|---|
| 186 | | - if (err != -EPROBE_DEFER) |
|---|
| 187 | | - dev_err(dev, "Failed to get rechargeable gpio\n"); |
|---|
| 188 | | - return err; |
|---|
| 189 | | - } |
|---|
| 181 | + if (err) |
|---|
| 182 | + return dev_err_probe(dev, err, |
|---|
| 183 | + "Failed to get rechargeable gpio\n"); |
|---|
| 190 | 184 | |
|---|
| 191 | 185 | /* |
|---|
| 192 | 186 | * The rechargeable battery indication switch cannot be changed without |
|---|