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>
struct plat_sci_port *p)
{
struct uart_port *port = &sci_port->port;
+ int ret;
port->ops = &sci_uart_ops;
port->iotype = UPIO_MEM;
break;
}
- if (p->regtype == SCIx_PROBE_REGTYPE)
- BUG_ON(sci_probe_regmap(p) != 0);
+ if (p->regtype == SCIx_PROBE_REGTYPE) {
+ ret = sci_probe_regmap(p);
+ if (unlikely(!ret))
+ return ret;
+ }
if (dev) {
sci_port->iclk = clk_get(&dev->dev, "sci_ick");