drm: Check if the allocation has succeeded before dereferencing newmode
drm: Check if the allocation has succeeded before dereferencing newmode

We allocate memory in drm_display_mode_from_vic_index() and use it
without checking the pointer is valid. Fix that.

Signed-off-by: Damien Lespiau <64bd3cb94f359c1a3ce68dae5e26b40578526277@intel.com>
Reviewed-by: Alex Deucher <08dc22c6156113f2deff178e35e3ed9b24d6af9e@amd.com>
Signed-off-by: Daniel Vetter <c1b6782c4af8f0673da8923a0702a1832e5940f4@ffwll.ch>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs