hwsim: check if radio name was already set

This was caught by static analysis and shouldn't ever happen.
This commit is contained in:
James Prestwood 2022-02-18 11:55:04 -08:00 committed by Denis Kenzior
parent 15c0920777
commit cd3857f810
1 changed files with 3 additions and 0 deletions

View File

@ -639,6 +639,9 @@ static void get_radio_callback(struct l_genl_msg *msg, void *user_data)
break;
case HWSIM_ATTR_RADIO_NAME:
if (name)
break;
name = l_strndup(data, len);
break;
}