msm: msm_fb: Consolidate 4cd20258e432f6231beba29f1b3581f2c04499ac to prevent illegal access and memory overflow