lkml.org 
[lkml]   [2018]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drm/msm/adreno: Remove VLA usage
From
Date
> @@ -91,12 +93,13 @@  static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname)
> ret = qcom_mdt_load(dev, fw, fwname, GPU_PAS_ID,
> mem_region, mem_phys, mem_size, NULL);
> } else {
> - char newname[strlen("qcom/") + strlen(fwname) + 1];
> + char *newname;
>
> - sprintf(newname, "qcom/%s", fwname);
> + newname = kasprintf(GFP_KERNEL, "qcom/%s", fwname);
>
> ret = qcom_mdt_load(dev, fw, newname, GPU_PAS_ID,
> mem_region, mem_phys, mem_size, NULL);

I have taken another look also at this update suggestion.
Now I wonder why the return value is not checked for the added name construction
in the way as it is specified for the function “adreno_request_fw”.
Will another condition check make sense at this place?

Regards,
Markus

\
 
 \ /
  Last update: 2018-07-02 10:35    [W:0.100 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site