check for return value of clk_get() in mpc512x_can_get_clock()

From: Andrej Krutak <hidden>
Date: 2011-02-23 13:42:19

Hi,

just wanted to inform you - in the mpc512x_can_get_clock() function 
(drivers/net/can/mscan/mpc5xxx_can.c), there are calls to clg_get(), and later 
checks

if (!sys_clk) {
and
if (!ref_clk) {

but these should be

if (IS_ERR(sys_clk)) {
and
if (IS_ERR(ref_clk)) {

(otherwise you'll get an oops if something goes wrong with clg_get()).


-- 
Best regards | S pozdravom | Mit freundlichen Grüßen

Andrej Krutak
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help