Skip to content
Snippets Groups Projects
Commit 3b6471c7 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Mauro Carvalho Chehab
Browse files

media: Staging: media: Release the correct resource in an error handling path


'res' is reassigned several times in the function and if we 'goto
error_unmap', its value is not the returned value of 'request_mem_region()'
anymore.

Introduce a new 'struct resource *' variable (i.e. res2) to keep a pointer
to the right resource, if needed in the error handling path.

Fixes: 4b4eda00 ("Staging: media: Unmap and release region obtained by ioremap_nocache")

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 05a7c22c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment