Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66fa6100 authored by Yannis Damigos's avatar Yannis Damigos Committed by Greg Kroah-Hartman
Browse files

staging:android:ion: Fix comparison with NULL



This patch fixes the following comparison with NULL issues:

CHECK: Comparison to NULL could be written "compatible[i].name"
+	for (i = 0; compatible[i].name != NULL; i++) {

CHECK: Comparison to NULL could be written "!compatible[i].name"
+	if (compatible[i].name == NULL)

Signed-off-by: default avatarYannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9f7a104c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -31,12 +31,12 @@ static int ion_parse_dt_heap_common(struct device_node *heap_node,
{
	int i;

	for (i = 0; compatible[i].name != NULL; i++) {
	for (i = 0; compatible[i].name; i++) {
		if (of_device_is_compatible(heap_node, compatible[i].compat))
			break;
	}

	if (compatible[i].name == NULL)
	if (!compatible[i].name)
		return -ENODEV;

	heap->id = compatible[i].heap_id;