diff options
| author | Rui Miguel Silva <[email protected]> | 2017-08-02 12:52:57 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2017-08-26 20:25:01 -0400 |
| commit | 428359cbfe086f43cb84b7ab7b48e7e7862700e2 (patch) | |
| tree | b35ac495063e4b228748e1b6ca935aa4ad0b3db3 /tools/perf/scripts/python | |
| parent | b7aaf8220aee35490751cd43861a3f61d63bda67 (diff) | |
media: staging: greybus: light: fix memory leak in v4l2 register
We are allocating memory for the v4l2 flash configuration structure and
leak it in the normal path. Just use the stack for this as we do not
use it outside of this function.
Also use IS_ERR() instead of IS_ERR_OR_NULL() to check return value from
v4l2_flash_init() for it never returns NULL.
Fixes: 2870b52bae4c ("greybus: lights: add lights implementation")
Reported-by: Sakari Ailus <[email protected]>
Signed-off-by: Rui Miguel Silva <[email protected]>
Reviewed-by: Viresh Kumar <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Acked-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions