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);