]> git.baikalelectronics.ru Git - kernel.git/commit
media: Staging: media: Release the correct resource in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 20 Aug 2017 16:49:01 +0000 (12:49 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 29 May 2019 20:55:36 +0000 (16:55 -0400)
commit83c78e859f9a70761b64790d4581efc99847bade
tree30578f45558a9a83f4047f78840ecfe81fa7e9a8
parent379e8a2be11427996cf4a4081c9611b1a19a8560
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: e4d1fe9a78c8 ("Staging: media: Unmap and release region obtained by ioremap_nocache")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/davinci_vpfe/dm365_ipipe.c