Skip to content
Commit 332e0d13 authored by Pan Bian's avatar Pan Bian Committed by Alexandre Belloni
Browse files

rtc: gemini: add return value validation



Function devm_ioremap() will return a NULL pointer if it fails to remap
IO address, and its return value should be validated before it is used.
However, in function gemini_rtc_probe(), its return value is not
checked. This may result in bad memory access bugs on future access,
e.g. calling the function gemini_rtc_read_time().

Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Acked-by: default avatarHans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 75892900
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment