summaryrefslogtreecommitdiffstats
path: root/drivers/iio/temperature/mcp9600.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/temperature/mcp9600.c')
-rw-r--r--drivers/iio/temperature/mcp9600.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/temperature/mcp9600.c b/drivers/iio/temperature/mcp9600.c
index 4684580429..7a3eef5d5e 100644
--- a/drivers/iio/temperature/mcp9600.c
+++ b/drivers/iio/temperature/mcp9600.c
@@ -52,7 +52,8 @@ static int mcp9600_read(struct mcp9600_data *data,
if (ret < 0)
return ret;
- *val = ret;
+
+ *val = sign_extend32(ret, 15);
return 0;
}