hsic: diag_bridge: Fix null pointer crash in read callback

Callback pointer could be null if diag forward succeeds to close all
the hsic channel while a diag request is underway. Prevent crash due
to race by checking for callback pointers(both read and write) before
accessing it.

Change-Id: I9b7b28baa4365db0e217a1925b4db3cf2b8f8280
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
1 file changed