On Wed, 23 Sep 2020 21:13:51 +0200 Heinrich Schuchardt <[email protected]> wrote:
> We should check if the incoming parameter file_mapping is not NULL instead > of checking after adding an offset. > > Reported-by: Coverity CID 307210 > Signed-off-by: Heinrich Schuchardt <[email protected]> Acked-by: Thomas Petazzoni <[email protected]> However, I wonder if this check is really useful. sqfs_read_metablock() is an internal function, so it should be up to the callers to make sure that they don't pass a NULL file_mapping argument. Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

