diff options
author | Nishant Malpani <nish.malpani25@gmail.com> | 2020-03-22 20:23:08 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-04-19 18:56:16 +0300 |
commit | 0e5fd387657abfed7da96edd8a313babb7f6a66a (patch) | |
tree | a93f61d9fd592c774fd87f6106f02ff95883e854 | |
parent | df91cf5c289c4dfe46aa7ef32231cc827b7e4d61 (diff) | |
download | linux-0e5fd387657abfed7da96edd8a313babb7f6a66a.tar.xz |
iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name
Utilize %pe format specifier from vsprintf while printing error logs
with dev_err(). Discards the use of unnecessary explicit casting and
prints symbolic error name which might prove to be convenient during
debugging.
Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/gyro/mpu3050-i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c index afa8018b9238..ef5bcbc4b45b 100644 --- a/drivers/iio/gyro/mpu3050-i2c.c +++ b/drivers/iio/gyro/mpu3050-i2c.c @@ -51,8 +51,8 @@ static int mpu3050_i2c_probe(struct i2c_client *client, regmap = devm_regmap_init_i2c(client, &mpu3050_i2c_regmap_config); if (IS_ERR(regmap)) { - dev_err(&client->dev, "Failed to register i2c regmap %d\n", - (int)PTR_ERR(regmap)); + dev_err(&client->dev, "Failed to register i2c regmap: %pe\n", + regmap); return PTR_ERR(regmap); } |