serial: sh-sci: Add missing call to uart_remove_one_port() in failure path
authorGeert Uytterhoeven <geert+renesas@linux-m68k.org>
Fri, 28 Feb 2014 13:21:33 +0000 (14:21 +0100)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:21:34 +0000 (09:21 +0900)
commitac2aee0ade4291e0b0a28b6d846c347f3be1aa25
tree9a25b029f70fb781bad29a325676c9efd3ee82d5
parentacc01cd9abd0c147f85cbcafdde37fddd410c71c
serial: sh-sci: Add missing call to uart_remove_one_port() in failure path

If cpufreq_register_notifier() fails, we have to remove the port added by
sci_probe_single(), which is not done by sci_cleanup_single().

Else the serial port stays active from the point of view of the serial
subsystem, and it may crash when userspace getty is started, or when the
loadable driver module is unloaded.

This was introduced by commit 6dae14216c85eea13db7b12c469475c5d30e5499
("serial: sh-sci: Fix probe error paths").

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit bf13c9a894162a91c8bb7d9555933e9fc3ff7d0e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/tty/serial/sh-sci.c