Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- common/resource.c | 2 +- drivers/serial/serial_ns16550.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/resource.c b/common/resource.c index fd04f26..e4bbe15 100644 --- a/common/resource.c +++ b/common/resource.c @@ -146,7 +146,7 @@ struct resource *request_ioport_region(const char *name, res = __request_region(&ioport_resource, name, start, end); if (IS_ERR(res)) - return NULL; + return ERR_CAST(res); return res; } diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c index 78a674a..4ca7444 100644 --- a/drivers/serial/serial_ns16550.c +++ b/drivers/serial/serial_ns16550.c @@ -353,8 +353,8 @@ static int ns16550_init_ioport(struct device_d *dev, struct ns16550_priv *priv) return PTR_ERR(res); res = request_ioport_region(dev_name(dev), res->start, res->end); - if (!res) - return -ENODEV; + if (IS_ERR(res)) + return PTR_ERR(res); priv->iobase = res->start; -- 2.1.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox