From: Ezequiel Garcia Date: Tue, 7 May 2013 11:27:16 +0000 (-0300) Subject: serial: 8250_dw: Add valid clk pointer check X-Git-Tag: v3.10-rc3~22^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbd2df859a4d992ccbceeb22c37f6a6c4aa4dc01;p=pandora-kernel.git serial: 8250_dw: Add valid clk pointer check Commit ffc3ae6dd "serial: 8250_dw: Enable runtime PM" introduced runtime PM management, which enables/disables the clk without checking if the clk is valid. However, this driver allows to be probed without a defined clk, using clock-frequency, as a fallback. Therefore, on platforms that are device tree probed using clock-frequency instead of clk, we get an ugly NULL pointer dereference. This patch fixes it by simply adding a check before accessing the clk api. Signed-off-by: Ezequiel Garcia Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed