initio.c: Fix for null pointer passed as parameter
Signed-off-by: Cosmin Popescu <gabrielcosmin.popescu@gmail.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
committed by
Mihai Tudor Panu
parent
c821c19899
commit
41fc378099
@@ -177,6 +177,10 @@ parse_uart(char** proto, size_t n, const char* proto_full)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (end == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int parity = -1;
|
||||
if (strncmp(end, U_PARITY_NONE, strlen(U_PARITY_NONE)) == 0) {
|
||||
parity = MRAA_UART_PARITY_NONE;
|
||||
|
||||
Reference in New Issue
Block a user