Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 519b371d authored by Stephen Boyd's avatar Stephen Boyd Committed by David Brown
Browse files

msm_serial: Use devm_clk_get() and properly return errors



Clocks are not clk_put() in this driver's error paths during
probe. The code that checks for clock errors also fails to
properly return the error code from the pclk member if it turns
out to be the failing clock, leading to potentially confusing
error values if the clk member is not an error pointer. Fix these
problems with devm_clk_get() and proper error checking.

Removing the clk_put() in msm_serial_remove() also points out
that msm_port is unused. Furthermore, msm_port is the wrong type
and so the clk_put() would be using the wrong pointer. Replace it
with the proper type and call uart_remove_one_port() to do the
proper cleanup.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid Brown <davidb@codeaurora.org>
parent f98cf83d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment