lkml.org 
[lkml]   [2017]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] rtc: gemini: add return value validation
On 23/04/2017 at 20:48:07 +0800, Pan Bian wrote:
> From: Pan Bian <bianpan2016@163.com>
>
> 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: Pan Bian <bianpan2016@163.com>
> ---
> drivers/rtc/rtc-gemini.c | 2 ++
> 1 file changed, 2 insertions(+)
>
Applied, thanks.

--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

\
 
 \ /
  Last update: 2017-05-05 00:59    [W:0.766 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site