summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorNishant Malpani <nish.malpani25@gmail.com>2020-03-22 22:53:08 +0530
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-04-19 16:56:16 +0100
commit0e5fd387657abfed7da96edd8a313babb7f6a66a (patch)
treea93f61d9fd592c774fd87f6106f02ff95883e854 /drivers/iio
parentdf91cf5c289c4dfe46aa7ef32231cc827b7e4d61 (diff)
downloadlinux-0e5fd387657abfed7da96edd8a313babb7f6a66a.tar.bz2
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>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/gyro/mpu3050-i2c.c4
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);
}