mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
tty: rpmsg: Use dev_err_probe() in ->probe()
It's fine to use dev_err_probe() in ->probe() even if we know it won't be deferred. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20211025135148.53944-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
408a507996
commit
8673ef7bd9
@ -153,10 +153,8 @@ static int rpmsg_tty_probe(struct rpmsg_device *rpdev)
|
||||
int ret;
|
||||
|
||||
cport = rpmsg_tty_alloc_cport();
|
||||
if (IS_ERR(cport)) {
|
||||
dev_err(dev, "Failed to alloc tty port\n");
|
||||
return PTR_ERR(cport);
|
||||
}
|
||||
if (IS_ERR(cport))
|
||||
return dev_err_probe(dev, PTR_ERR(cport), "Failed to alloc tty port\n");
|
||||
|
||||
tty_port_init(&cport->port);
|
||||
cport->port.ops = &rpmsg_tty_port_ops;
|
||||
@ -164,8 +162,7 @@ static int rpmsg_tty_probe(struct rpmsg_device *rpdev)
|
||||
tty_dev = tty_port_register_device(&cport->port, rpmsg_tty_driver,
|
||||
cport->id, dev);
|
||||
if (IS_ERR(tty_dev)) {
|
||||
dev_err(dev, "Failed to register tty port\n");
|
||||
ret = PTR_ERR(tty_dev);
|
||||
ret = dev_err_probe(dev, PTR_ERR(tty_dev), "Failed to register tty port\n");
|
||||
goto err_destroy;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user