My static checker complains that we don't have any error handling here.
It's simple enough to add it.
Fixes:
bed35c6dfa6a ("serdev: add a tty port controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct ktermios ktermios;
tty = tty_init_dev(serport->tty_drv, serport->tty_idx);
+ if (IS_ERR(tty))
+ return PTR_ERR(tty);
serport->tty = tty;
serport->port->client_ops = &client_ops;