drm/msm/dpu: drop unused memory allocation
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 22 Aug 2022 17:24:55 +0000 (20:24 +0300)
committerRob Clark <robdclark@chromium.org>
Sun, 18 Sep 2022 16:38:03 +0000 (09:38 -0700)
Drop the dpu_cfg variable and corresponding kzalloc, which became unused
after changing hw catalog to static configuration.

Fixes: de7d480f5e8c ("drm/msm/dpu: make dpu hardware catalog static const")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/498738/
Link: https://lore.kernel.org/r/20220822172455.282923-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c

index 76b35410be71483b145981ada1c12bcb9329f4c2..27f029fdc68298c6f182148a75f2bdaf340ee7af 100644 (file)
@@ -1939,11 +1939,6 @@ static const struct dpu_mdss_hw_cfg_handler cfg_handler[] = {
 const struct dpu_mdss_cfg *dpu_hw_catalog_init(u32 hw_rev)
 {
        int i;
-       struct dpu_mdss_cfg *dpu_cfg;
-
-       dpu_cfg = kzalloc(sizeof(*dpu_cfg), GFP_KERNEL);
-       if (!dpu_cfg)
-               return ERR_PTR(-ENOMEM);
 
        for (i = 0; i < ARRAY_SIZE(cfg_handler); i++) {
                if (cfg_handler[i].hw_rev == hw_rev)