Skip to content

Commit

Permalink
sh-sci: avoid writing to nonexistent registers
Browse files Browse the repository at this point in the history
Only write to hardware in SCI_OUT() if the register size is valid.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed May 8, 2008
1 parent 9b4e466 commit 3d2c2f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/sh-sci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
}

Expand Down

0 comments on commit 3d2c2f3

Please sign in to comment.