]> git.baikalelectronics.ru Git - kernel.git/commit
serial: sh-sci: Make probe fail for ports that exceed the maximum count
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 12 Jun 2012 22:28:24 +0000 (00:28 +0200)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 13 Jun 2012 01:22:10 +0000 (10:22 +0900)
commit86094bb6c45d6adc92bd1d77c204c5b4976f67af
treea990e8e93deefb12f55075633a6c164e2742dfa7
parentd66fbf3e1029249282495f165e10bc8a751fe126
serial: sh-sci: Make probe fail for ports that exceed the maximum count

The driver supports a maximum number of ports configurable at compile
time. Make sure the probe() method fails when registering a port that
exceeds the maximum instead of returning success without registering the
port.

This fixes a crash at system suspend time, when the driver tried to
suspend a non-registered port using the UART core.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/tty/serial/sh-sci.c