Skip to content
Commit dbd2df85 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Greg Kroah-Hartman
Browse files

serial: 8250_dw: Add valid clk pointer check



Commit ffc3ae6d "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: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f722406f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment