[snip]
And NULL pointer checking was already done above like below, if (overlay_ops && overlay_ops->disable) overlay_ops->disable(manager->dev, zpos);
Correct. But that check is applicable only for that one statement (overlay_ops->disable(manager->dev, zpos);).
Similar check needs to be added to below 'if' code too.
What are your comments about this?
Left condition first is checked so as I mentioned before, it doesn't need overlay_ops checking because that was checked already. why do you think overlay_ops should be checked again?
Consider the case when overlay_ops is NULL.
if (overlay_ops && overlay_ops->disable) overlay_ops->disable(manager->dev, zpos);
It does not enter this condition as overlay_ops is NULL and moves to the next statement, if (overlay_ops->wait_for_vblank) where it gets dereferenced.
Please note we are not returning back from the first condition if overlay_ops is NULL. Hence we need to check the condition in second case too.