libchip/serial/mc68681.c: Add error check

This was spotted by Coverity Scan.
This commit is contained in:
Joel Sherrill
2017-03-13 10:41:53 -05:00
parent eb733202ad
commit 17d1aa7cc0

View File

@@ -586,6 +586,8 @@ MC68681_STATIC int mc68681_baud_rate(
baud_requested = B9600; /* default to 9600 baud */
baud_requested = rtems_termios_baud_to_index( baud_requested );
if (baud_requested == -1)
return -1;
baud_tbl = (mc68681_baud_table_t *)
((uintptr_t)Console_Port_Tbl[minor]->ulClock);