summaryrefslogtreecommitdiff
path: root/drivers/iio/imu/inv_mpu6050
diff options
context:
space:
mode:
authorNishant Malpani <nish.malpani25@gmail.com>2020-03-22 22:53:11 +0530
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-04-19 16:56:17 +0100
commitfb3f7ab7736d22aae8282a1d56f3187ecf9cb66f (patch)
treec65ad7dbcef4830a6d98bd6531d62b5752091ee1 /drivers/iio/imu/inv_mpu6050
parent35c9c8d5ec0734f6044d21a46e97d879d40dd12b (diff)
iio: imu: inv_mpu6050_i2c: 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>
Diffstat (limited to 'drivers/iio/imu/inv_mpu6050')
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
index 6993d3b87bb0..28cfae1e61cf 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
@@ -122,8 +122,8 @@ static int inv_mpu_probe(struct i2c_client *client,
regmap = devm_regmap_init_i2c(client, &inv_mpu_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);
}