Skip to content

Commit e472f79

Browse files
committed
media: ov7740: Fix compilation error on probe cleanup
If MEDIA_CONTROLLER is not enabled in the config, the entity field is not defined. Signed-off-by: Razvan Stefanescu <razvan.stefanescu@microchip.com>
1 parent 9ef6e53 commit e472f79

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/media/i2c/ov7740.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,9 @@ static int ov7740_probe(struct i2c_client *client,
11361136
ov7740_free_controls(ov7740);
11371137
error_detect:
11381138
ov7740_set_power(ov7740, 0);
1139+
#if defined(CONFIG_MEDIA_CONTROLLER)
11391140
media_entity_cleanup(&ov7740->subdev.entity);
1141+
#endif
11401142

11411143
return ret;
11421144
}

0 commit comments

Comments
 (0)