Unverified Commit d4744353 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15862 tty: goldfish: Use tty_port_destroy() to destroy port

parents 75a88146 3f3c125c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -407,6 +407,7 @@ static int goldfish_tty_probe(struct platform_device *pdev)
err_tty_register_device_failed:
	free_irq(irq, qtty);
err_dec_line_count:
	tty_port_destroy(&qtty->port);
	goldfish_tty_current_line_count--;
	if (goldfish_tty_current_line_count == 0)
		goldfish_tty_delete_driver();
@@ -428,6 +429,7 @@ static int goldfish_tty_remove(struct platform_device *pdev)
	iounmap(qtty->base);
	qtty->base = NULL;
	free_irq(qtty->irq, qtty);
	tty_port_destroy(&qtty->port);
	goldfish_tty_current_line_count--;
	if (goldfish_tty_current_line_count == 0)
		goldfish_tty_delete_driver();