提交 11b03ea0 编写于 作者: J Jakub Kicinski 提交者: Greg Kroah-Hartman

sc16is7xx: remove ports on probe error path

If ports are not explicitly removed on the error path
the device will not get properly unregistered leaving
/dev/ttySC* nodes in the filesystem.
Signed-off-by: NJakub Kicinski <kubakici@wp.pl>
Signed-off-by: NJon Ringle <jringle@gridpoint.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 1cf94d3a
......@@ -1120,6 +1120,9 @@ static int sc16is7xx_probe(struct device *dev,
if (!ret)
return 0;
for (i = 0; i < s->uart.nr; i++)
uart_remove_one_port(&s->uart, &s->p[i].port);
mutex_destroy(&s->mutex);
#ifdef CONFIG_GPIOLIB
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册