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

Commit be0de951 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "diag: Null pointer check to avoid kernel panic"

parents 11ac197d 70568f33
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -714,6 +714,11 @@ struct diag_cmd_reg_entry_t *diag_cmd_search(

	list_for_each_safe(start, temp, &driver->cmd_reg_list) {
		item = list_entry(start, struct diag_cmd_reg_t, link);
		if (&item->entry == NULL) {
			pr_err("diag: In %s, unable to search command\n",
			       __func__);
			return NULL;
		}
		temp_entry = &item->entry;
		if (temp_entry->cmd_code == entry->cmd_code &&
		    temp_entry->subsys_id == entry->subsys_id &&