mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
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>
This commit is contained in:
parent
a86b4936ba
commit
d9ab83953f
1 changed files with 2 additions and 0 deletions
|
@ -208,6 +208,8 @@ int hmm_init(void)
|
||||||
|
|
||||||
void hmm_cleanup(void)
|
void hmm_cleanup(void)
|
||||||
{
|
{
|
||||||
|
if (!dummy_ptr)
|
||||||
|
return;
|
||||||
sysfs_remove_group(&atomisp_dev->kobj, atomisp_attribute_group);
|
sysfs_remove_group(&atomisp_dev->kobj, atomisp_attribute_group);
|
||||||
|
|
||||||
/* free dummy memory first */
|
/* free dummy memory first */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue