aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-12-02 05:10:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-15 22:06:42 -0500
commita6dd114e16cbc4410049a90a8a67b967333d108d (patch)
tree13c19c17a03671d7188bfbe96243feb0f89a0fcd /drivers
parent87b8bed2ce9394870a87e4fb2aef6752b2bd837d (diff)
tty: serial: vt8500: fix return value check in vt8500_serial_probe()
In case of error, function of_clk_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Tony Prisk <linux@prisktech.co.nz> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/vt8500_serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index 8fd181436a6b..d5ed9f613005 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -604,7 +604,7 @@ static int vt8500_serial_probe(struct platform_device *pdev)
604 vt8500_port->uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; 604 vt8500_port->uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
605 605
606 vt8500_port->clk = of_clk_get(pdev->dev.of_node, 0); 606 vt8500_port->clk = of_clk_get(pdev->dev.of_node, 0);
607 if (vt8500_port->clk) { 607 if (!IS_ERR(vt8500_port->clk)) {
608 vt8500_port->uart.uartclk = clk_get_rate(vt8500_port->clk); 608 vt8500_port->uart.uartclk = clk_get_rate(vt8500_port->clk);
609 } else { 609 } else {
610 /* use the default of 24Mhz if not specified and warn */ 610 /* use the default of 24Mhz if not specified and warn */