lkml.org 
[lkml]   [2022]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tty/serial: Check for null pointer after calling devm_ioremap
On Thu, Jan 06, 2022 at 05:06:31PM +0800, Jiasheng Jiang wrote:
> As the possible failure of the allocation, the devm_ioremap() may return
> NULL pointer.

I do not understand this sentence.

> And the 'port->membase' will be directly used in mlb_usio_startup().

This does not make sense either.


> Therefore, in order to avoid the dereference of the NULL pointer, it
> should be better to add the sanity check.

What do you mean by "sanity check"?

confused,

greg k-h

\
 
 \ /
  Last update: 2022-01-06 16:01    [W:0.036 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site