serial: amba-pl011: Fix devm_ioremap_resource return value check
authorKrzysztof Kozlowski <k.kozlowski.k@gmail.com>
Thu, 9 Jul 2015 13:21:41 +0000 (22:21 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 22:05:53 +0000 (15:05 -0700)
commit97a60eac33f663d2150ee1b3c69253d87ba53dff
tree14465d948b30395805aec179f4970bb42118759a
parent3b19e032295647b7be2aa3be62510db4aaeda759
serial: amba-pl011: Fix devm_ioremap_resource return value check

Value returned by devm_ioremap_resource() was checked for non-NULL but
devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of
error this could lead to dereference of ERR_PTR.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Cc: <stable@vger.kernel.org>
Fixes: 3873e2d7f63a ("drivers: PL011: refactor pl011_probe()")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c