Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 18 Mar 2024 09:48:33 -0700 | Subject | Re: [PATCH 2/2] hwmon: pmbus: adp1050 : Add driver support | From | Guenter Roeck <> |
| |
On 3/18/24 09:12, Krzysztof Kozlowski wrote: > On 18/03/2024 12:21, Radu Sabau wrote: >> Add support for ADP1050 Digital Controller for Isolated Power Supplies >> with PMBus interface Voltage, Current and Temperature Monitor. >> > > ... > >> +static int adp1050_probe(struct i2c_client *client) >> +{ >> + u32 vin_scale_monitor, iin_scale_monitor; >> + int ret; >> + >> + if (!i2c_check_functionality(client->adapter, >> + I2C_FUNC_SMBUS_WRITE_WORD_DATA)) >> + return -ENODEV; >> + >> + /* Unlock CHIP's password in order to be able to read/write to it's >> + * VIN_SCALE and IIN_SCALE registers. >> + */ >> + ret = i2c_smbus_write_word_data(client, ADP1050_CHIP_PASSWORD, 0xFFFF); >> + if (ret < 0) { >> + dev_err_probe(&client->dev, "Device can't be unlocked.\n"); > > Syntax is: return dev_err_probe(). Same in other places. >
dev_err_probe() expects the error number as second parameter, so I don't really understand how the above even compiles.
Guenter
| ![\](/images/icornerr.gif) |