gpu: drm: xylon: Return error if i2c client driver is NULL
Return error if i2c_client driver instance is NULL.
Incase i2c encoder(adv7511) probe fails not checking
it will result in NULL pointer dereference.
<snip>
Unable to handle kernel NULL pointer dereference at virtual address
00000050
pgd =
40004000
[
00000050] *pgd=
00000000
Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 690 Comm: kworker/u4:2 Not tainted
3.19.0-xilinx-13711-g2b55e97-dirty #49
Hardware name: Xilinx Zynq Platform
Workqueue: deferwq deferred_probe_work_func
task:
771ab100 ti:
72a42000 task.ti:
72a42000
PC is at xylon_drm_encoder_create+0xf4/0x188
LR is at xylon_drm_encoder_create+0xf4/0x188
Signed-off-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Christian Kohn <christian.kohn@xilinx.com>