From 6b7ecc47c4b3bad51b4142906f24c784e4da470d Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 19 Feb 2016 12:51:27 +0200 Subject: [PATCH] Bluetooth: GATT: Fix error response to bt_gatt_attr_read() Change-Id: Ic5ab95d2c5ff62975f59239fd79068025ec5c54f Signed-off-by: Johan Hedberg --- net/bluetooth/gatt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/gatt.c b/net/bluetooth/gatt.c index 556db84c4f6..9b8bc2a4193 100644 --- a/net/bluetooth/gatt.c +++ b/net/bluetooth/gatt.c @@ -127,7 +127,7 @@ int bt_gatt_attr_read(struct bt_conn *conn, const struct bt_gatt_attr *attr, uint16_t len; if (offset > value_len) { - return -EINVAL; + return BT_GATT_ERR(BT_ATT_ERR_INVALID_OFFSET); } len = min(buf_len, value_len - offset);