media: cec: Fix crash if HPD is occurred before adapt allocated.

Change-Id: I4d546cdbbecfd124c7cd6a985f0843879037b6dc
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2018-01-31 17:10:56 +08:00
parent 64b91f4baf
commit bda1198450

View File

@@ -169,6 +169,8 @@ void cec_queue_pin_hpd_event(struct cec_adapter *adap, bool is_high, ktime_t ts)
};
struct cec_fh *fh;
if (!adap)
return;
/* hdmi HPD may occur before devnode is registered */
if (!adap->devnode.registered)
return;