Skip to content

Commit 3127c6b

Browse files
committed
serial: sh-sci: Regtype probing doesn't need to be fatal.
This was using a BUG_ON(), but it's not strictly necessary, so relax the constraints a bit. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 4b8c59a commit 3127c6b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎drivers/tty/serial/sh-sci.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,7 @@ static int __devinit sci_init_single(struct platform_device *dev,
18251825
struct plat_sci_port *p)
18261826
{
18271827
struct uart_port *port = &sci_port->port;
1828+
int ret;
18281829

18291830
port->ops = &sci_uart_ops;
18301831
port->iotype = UPIO_MEM;
@@ -1845,8 +1846,11 @@ static int __devinit sci_init_single(struct platform_device *dev,
18451846
break;
18461847
}
18471848

1848-
if (p->regtype == SCIx_PROBE_REGTYPE)
1849-
BUG_ON(sci_probe_regmap(p) != 0);
1849+
if (p->regtype == SCIx_PROBE_REGTYPE) {
1850+
ret = sci_probe_regmap(p);
1851+
if (unlikely(!ret))
1852+
return ret;
1853+
}
18501854

18511855
if (dev) {
18521856
sci_port->iclk = clk_get(&dev->dev, "sci_ick");

0 commit comments

Comments
 (0)