summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-07-17 10:52:26 +0200
committerJonathan Cameron <jic23@kernel.org>2015-07-19 11:53:35 +0100
commit6a14925ef22bf6e9e3f5209db50708210d5ee451 (patch)
tree677dab6841a52d7e2b909f35349aaa962906cc7f /drivers/iio
parent2e187a028496ffde88c9441a5dbb4e2cd58abb98 (diff)
downloadblackbird-op-linux-6a14925ef22bf6e9e3f5209db50708210d5ee451.tar.gz
blackbird-op-linux-6a14925ef22bf6e9e3f5209db50708210d5ee451.zip
iio:magnetometer:bmc150_magn: output intended variable
According to the debug/error string, the content of chip_id is supposed to be output, rather than the return value of the previous operation. Fixes: c91746a2361d ("iio: magn: Add support for BMC150 magnetometer") Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/magnetometer/bmc150_magn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
index d4c178869991..1347a1f2e46f 100644
--- a/drivers/iio/magnetometer/bmc150_magn.c
+++ b/drivers/iio/magnetometer/bmc150_magn.c
@@ -706,11 +706,11 @@ static int bmc150_magn_init(struct bmc150_magn_data *data)
goto err_poweroff;
}
if (chip_id != BMC150_MAGN_CHIP_ID_VAL) {
- dev_err(&data->client->dev, "Invalid chip id 0x%x\n", ret);
+ dev_err(&data->client->dev, "Invalid chip id 0x%x\n", chip_id);
ret = -ENODEV;
goto err_poweroff;
}
- dev_dbg(&data->client->dev, "Chip id %x\n", ret);
+ dev_dbg(&data->client->dev, "Chip id %x\n", chip_id);
preset = bmc150_magn_presets_table[BMC150_MAGN_DEFAULT_PRESET];
ret = bmc150_magn_set_odr(data, preset.odr);
OpenPOWER on IntegriCloud