media: vivid: check if the cec_adapter is valid
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 12 Feb 2018 11:45:32 +0000 (06:45 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:25 +0000 (09:36 +0200)
commit2fb28b075f80136b17c8aebb2c006a3502c628db
tree7796a686d21b7d604778f62bbfce0fd0ffef5728
parent9864a1ef86791897b0f6c215001deae472c05635
media: vivid: check if the cec_adapter is valid

commit ed356f110403f6acc64dcbbbfdc38662ab9b06c2 upstream.

If CEC is not enabled for the vivid driver, then the adap pointer is NULL
and 'adap->phys_addr' will fail.

Cc: <stable@vger.kernel.org> # for v4.12 and up
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/vivid/vivid-vid-common.c