mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 07:22:34 +00:00
Check if the pointer lcd->ops->init_display exists before dereferencing it. If a driver called charlcd_init() without defining the ops, this would return segmentation fault, as happened to me when implementing a charlcd driver. Checking the pointer before dereferencing protects from segmentation fault. Signed-off-by: Luiz Sampaio <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>