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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jun 2012 22:56:54 +0000 (15:56 -0700)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

No differences found