serial: 8250: of: Correct of_platform_serial_setup() error handling

Don't dispose IRQ mapping before it has been created.

Fixes: aa9594740 ("serial: 8250_of: Add IO space support")
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alexander Sverdlin 2018-07-13 16:58:54 +02:00 committed by Greg Kroah-Hartman
parent b819e4aba0
commit b29330d829

View File

@ -124,7 +124,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n",
prop);
ret = -EINVAL;
goto err_dispose;
goto err_unprepare;
}
}
port->flags |= UPF_IOREMAP;