CEC: do not join NULL thread
'hdmicec_close' may be called after exit_fd initialized, but before ctx->thread created. This patch checks it for NULL before join. Test: manual Change-Id: I1c57be56f2cd9956044d9a48fea914b1c1fd0132 Signed-off-by: Oleg Lyovin <ovlevin@salutedevices.com>
This commit is contained in:
@@ -462,6 +462,7 @@ static int hdmicec_close(struct hdmi_cec_device *dev)
|
||||
|
||||
if (ctx->exit_fd > 0) {
|
||||
write(ctx->exit_fd, &tmp, sizeof(tmp));
|
||||
if (ctx->thread)
|
||||
pthread_join(ctx->thread, NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user