Bluetooth: GATT: Fix dereference after NULL check

This fixes the coverity problem which which in fact is a non-issue as
the code would assert before reaching that line which makes the NULL
pointer check useless so this removes it.

Fixes #18431

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2019-08-19 12:24:04 +03:00 committed by Ioannis Glaropoulos
parent 2f91f1323d
commit 6c8eebe046

View file

@ -234,10 +234,8 @@ void test_gatt_read(void)
&test_chrc_uuid.uuid, NULL, 0, find_attr,
&attr);
zassert_not_null(attr, "Attribute don't match");
if (attr) {
zassert_equal(attr->uuid, &test_chrc_uuid.uuid,
zassert_equal(attr->uuid, &test_chrc_uuid.uuid,
"Attribute UUID don't match");
}
ret = attr->read(NULL, attr, (void *)buf, sizeof(buf), 0);
zassert_equal(ret, strlen(test_value),