Loading
iio: adc: men_z188_adc: Fix a resource leak in an error handling path
stable inclusion from stable-v4.19.232 commit 53d43a9c8dd224e66559fe86af1e473802c7130e category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IALQ1H CVE: CVE-2022-48928 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=53d43a9c8dd224e66559fe86af1e473802c7130e -------------------------------- commit e0a2e37f upstream. If iio_device_register() fails, a previous ioremap() is left unbalanced. Update the error handling path and add the missing iounmap() call, as already done in the remove function. Fixes: 74aeac4d ("iio: adc: Add MEN 16z188 ADC driver") Signed-off-by:Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/320fc777863880247c2aff4a9d1a54ba69abf080.1643445149.git.christophe.jaillet@wanadoo.fr Cc: <Stable@vger.kernel.org> Signed-off-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Ye Bin <yebin10@huawei.com>