staging: sm750fb: Call iounmap() to free mapped bus memory
authorFabio M. De Francesco <fmdefrancesco@gmail.com>
Sat, 2 Apr 2022 17:56:55 +0000 (19:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 05:33:49 +0000 (07:33 +0200)
commitaaec586a3ca5d24ed67faee54f7a54d3e6ac1107
tree114c225c5114c1435a0ac197b45781493b5095b3
parentc9736770e6c30295dfd1802dde87b7f727d699f7
staging: sm750fb: Call iounmap() to free mapped bus memory

If ioremap_wc() fails, the code jumps to the "exit" label and forgets to
free the bus memory mapped into "sm750_dev->pvReg". Mapped bus memory must
always be freed by calling iounmap().

Call iounmap(sm750_dev->pvReg) when the above-mentioned failures happen.

The site of the missing iounmap() has been detected by Smatch.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20220402175655.31512-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750_hw.c