]> git.baikalelectronics.ru Git - kernel.git/commit
media: atomisp: don't cause a warn if probe failed
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 28 May 2020 10:11:57 +0000 (12:11 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Jun 2020 16:24:23 +0000 (18:24 +0200)
commitedbd1b690f24d8a4f609c724e28d39bf2457fbef
tree2c16e3d7bd6259a757a33e9b8b5b34efdfba9d32
parent38ce1cee995e23650a15fe62bd726f5e5f1b8f72
media: atomisp: don't cause a warn if probe failed

When probe fails, it is possible that hmm_init() to not be
called. On such case, hmm_cleanup() will cause a WARN_ON().

Avoid it by adding an explicit check at hmm_cleanup() to
ensure that the hmm code was properly initialized.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/hmm/hmm.c