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: NPan Bian <bianpan2016@163.com> Acked-by: NHans Ulli Kroll <ulli.kroll@googlemail.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
Showing
想要评论请 注册 或 登录