sh-sci: avoid writing to nonexistent registers
PATCH 1/1 sh-sci: avoid writing to nonexistent registers
Only write to hardware in SCI_OUT() if the register size is valid.
Signed-off-by Magnus Damm <[email protected]>
---
drivers/serial/sh-sci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/sh-sci.h +1 -1
@@ -321,7 +321,7 @@unsigned int addr = port->mapbase + (offset); \if ((size) =8 ) { \ctrl_outb (value, addr); \ - }else { \ + }else if ((size) =16 ) { \ctrl_outw (value, addr); \ }