Commit 7c64884b authored by Rashika Kheria's avatar Rashika Kheria Committed by Greg Kroah-Hartman
Browse files

Staging: sb105x: Fix a possible null dereference



This patch fixes the following error in sb_pc_mp.c-

drivers/staging/sb105x/sb_pci_mp.c:546 mp_startup() error: we previously assumed 'info->tty' could be null (see line 525)

Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 59573240
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -543,13 +543,13 @@ static int mp_startup(struct sb_uart_state *state, int init_hw)
		if (init_hw) {
			mp_change_speed(state, NULL);

			if (info->tty->termios.c_cflag & CBAUD)
			if (info->tty && (info->tty->termios.c_cflag & CBAUD))
				uart_set_mctrl(port, TIOCM_RTS | TIOCM_DTR);
		}

		info->flags |= UIF_INITIALIZED;


		if (info->tty)
			clear_bit(TTY_IO_ERROR, &info->tty->flags);
	}