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

sdio_uart: Fix SDIO break control to now return success or an error

This is a consequence of patch 9ea761bfef52c116fed4715d4043392c2503fe6a.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>

authored by

David Howells and committed by
Pierre Ossman
c43d8636 6a36913a

+6 -3
+6 -3
drivers/mmc/card/sdio_uart.c
··· 885 885 sdio_uart_release_func(port); 886 886 } 887 887 888 - static void sdio_uart_break_ctl(struct tty_struct *tty, int break_state) 888 + static int sdio_uart_break_ctl(struct tty_struct *tty, int break_state) 889 889 { 890 890 struct sdio_uart_port *port = tty->driver_data; 891 + int result; 891 892 892 - if (sdio_uart_claim_func(port) != 0) 893 - return; 893 + result = sdio_uart_claim_func(port); 894 + if (result != 0) 895 + return result; 894 896 895 897 if (break_state == -1) 896 898 port->lcr |= UART_LCR_SBC; ··· 901 899 sdio_out(port, UART_LCR, port->lcr); 902 900 903 901 sdio_uart_release_func(port); 902 + return 0; 904 903 } 905 904 906 905 static int sdio_uart_tiocmget(struct tty_struct *tty, struct file *file)