video: driver: fix error handling sequence in msm_vidc_open
Currently msm_vidc_close is called directly for any failure in msm_vidc_open(at any level). So i.e leading to free without alloc & deinit without init problems. Example: if msm_vdec_inst_init is failed, msm_vidc_event_queue_deinit will be called as part of msm_vidc_close and leading to crash at v4l2_fh_del. v4l2_fh_del should be called only if v4l2_fh_add is successful. Change-Id: I5dd063c19327b881f533aa141f77b23ee7fad125 Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
@@ -138,6 +138,7 @@ struct msm_vidc_inst {
|
||||
struct completion completions[MAX_SIGNAL];
|
||||
bool active;
|
||||
u64 last_qbuf_time_ns;
|
||||
bool vb2q_init;
|
||||
};
|
||||
|
||||
#endif // _MSM_VIDC_INST_H_
|
||||
|
Reference in New Issue
Block a user