Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp40490pxf; Tue, 9 Mar 2021 23:09:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKL3wkvKoMfRrvlmiYDpvPUsnOYFcbW0k7dU1GcL9yvnwUvGW9BxzL1Vf0YuDkK0Tp4hVY X-Received: by 2002:a17:906:14d4:: with SMTP id y20mr2117761ejc.190.1615360170195; Tue, 09 Mar 2021 23:09:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615360170; cv=none; d=google.com; s=arc-20160816; b=s5XbuC61DpCbv1SeFRXMLRXflVU7D62Xf4m2Ul8J9lxdmWBeJoJxW5/6GRHZ2Gg05a 2gOqcL3E319n9xRF/MP203d6CEUF0J8fAEHfPe8zI7JIgF/vAsMOqunjRIwyR++4YUA6 GWs4E3awKZfgbbHcwnEHa+7RbVfrKx7RHoCud3IapG2iLMwwiZfgQEpsmtjf8lnW1h7W rhoVgP1DsIy6PkClku8BwsStSwA5zF87d3klNWAmm8D/aEKvPsZ/Bex2to63vCC70ajO 9v66Zmdng7jp2h7KYB4H6TyR3ceRlKlrNJxDCbRMAqgvReRhsDKdtjcKKHQwvyaPPvIc uGsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=darfiEQT56btPM+Jj4J3Ujn09fC6E9/ydFqiMy+aT2g=; b=Qa++FEjsoKZ+lH2v5CWSjE1lRHy+Hxb9MdZCc6IWloE3AQhuGeREj4aelq/pOj99NP BwrvPnlJjul4bUrjHKJ6az5RTQgFB51SnRhFuVKUVpDle16YTWwejIUl+PQIQHepwW4z X8sDZ7Vlg/kAeu27MhoRLAKZ7rySxVVzFhcjvTDVKBHdLjw7ahs6clr5q+FUW1xl3mwL 9/viMXrT+YS6M1/MOTAc5By74NkK1fOGKwhO8odjuxwDTktN26Z7WXkIDErW7gY1uW1Q Y06Tk4JRt1HWuurAFi6zCEXcDWY3KkDyqN1sfNo+UoujJxVfsDJ6GfcIbfvYTSB596/G mnKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si9894222ejk.68.2021.03.09.23.09.07; Tue, 09 Mar 2021 23:09:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229875AbhCJHFA (ORCPT + 99 others); Wed, 10 Mar 2021 02:05:00 -0500 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:41470 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbhCJHEn (ORCPT ); Wed, 10 Mar 2021 02:04:43 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R621e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0UREgc7n_1615359875; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UREgc7n_1615359875) by smtp.aliyun-inc.com(127.0.0.1); Wed, 10 Mar 2021 15:04:40 +0800 From: Jiapeng Chong To: harry.wentland@amd.com Cc: sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] drm/amd/display: fix warning comparing pointer to 0 Date: Wed, 10 Mar 2021 15:04:34 +0800 Message-Id: <1615359874-14817-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c:76:14-15: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c index c6a1cd8..69211f5 100644 --- a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c +++ b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c @@ -73,7 +73,7 @@ static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc, TABLE_CASE(420, 12, min); } - if (table == 0) + if (!table) return; index = (bpp - table[0].bpp) * 2; -- 1.8.3.1