Commit fd10fb4
media: i2c: ov8856: free control handler on error in ov8856_init_controls()
commit f75e160 upstream.
The control handler wasn't freed if adding controls failed, add an error
exit label and convert the existing error return to use it.
Fixes: 879347f ("media: ov8856: Add support for OV8856 sensor")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 6467d65 commit fd10fb4
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1954 | 1954 | | |
1955 | 1955 | | |
1956 | 1956 | | |
1957 | | - | |
1958 | | - | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
1959 | 1961 | | |
1960 | 1962 | | |
1961 | 1963 | | |
1962 | 1964 | | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
1963 | 1969 | | |
1964 | 1970 | | |
1965 | 1971 | | |
| |||
0 commit comments