Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: hci_ldisc: Fix tty_set_termios() return value assumptions

tty_set_termios() never returns anything else than 0. Make the debug
prints to look directly into the new termios instead to check CRTSCTS
state.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Ilpo Järvinen and committed by
Luiz Augusto von Dentz
586e154f 7c2b2d2d

+4 -4
+4 -4
drivers/bluetooth/hci_ldisc.c
··· 323 323 /* Disable hardware flow control */ 324 324 ktermios = tty->termios; 325 325 ktermios.c_cflag &= ~CRTSCTS; 326 - status = tty_set_termios(tty, &ktermios); 326 + tty_set_termios(tty, &ktermios); 327 327 BT_DBG("Disabling hardware flow control: %s", 328 - status ? "failed" : "success"); 328 + (tty->termios.c_cflag & CRTSCTS) ? "failed" : "success"); 329 329 330 330 /* Clear RTS to prevent the device from sending */ 331 331 /* Most UARTs need OUT2 to enable interrupts */ ··· 357 357 /* Re-enable hardware flow control */ 358 358 ktermios = tty->termios; 359 359 ktermios.c_cflag |= CRTSCTS; 360 - status = tty_set_termios(tty, &ktermios); 360 + tty_set_termios(tty, &ktermios); 361 361 BT_DBG("Enabling hardware flow control: %s", 362 - status ? "failed" : "success"); 362 + !(tty->termios.c_cflag & CRTSCTS) ? "failed" : "success"); 363 363 } 364 364 } 365 365