Skip to content

Commit ed74585

Browse files
rbudai98buha
authored andcommitted
drivers: platform: maxim
During uart initialization check for memory allocaiton of maxim_uart Signed-off-by: rbudai98 <[email protected]>
1 parent c57ad67 commit ed74585

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/platform/maxim/max32660/maxim_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ static int32_t max_uart_init(struct no_os_uart_desc **desc,
250250
return -ENOMEM;
251251

252252
max_uart = no_os_calloc(1, sizeof(*max_uart));
253-
if (!descriptor) {
253+
if (!max_uart) {
254254
ret = -ENOMEM;
255255
goto error;
256256
}

drivers/platform/maxim/max32662/maxim_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ static int32_t max_uart_init(struct no_os_uart_desc **desc,
251251
return -ENOMEM;
252252

253253
max_uart = no_os_calloc(1, sizeof(*max_uart));
254-
if (!descriptor) {
254+
if (!max_uart) {
255255
ret = -ENOMEM;
256256
goto error;
257257
}

drivers/platform/maxim/max32665/maxim_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static int32_t max_uart_init(struct no_os_uart_desc **desc,
263263
return -ENOMEM;
264264

265265
max_uart = no_os_calloc(1, sizeof(*max_uart));
266-
if (!descriptor) {
266+
if (!max_uart) {
267267
ret = -ENOMEM;
268268
goto error;
269269
}

0 commit comments

Comments
 (0)