Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1876308ybz; Sun, 26 Apr 2020 06:15:58 -0700 (PDT) X-Google-Smtp-Source: APiQypLcDp2s614+MesOqa4CggUeHnVHX4+ilH4pRcgF711WoOZUWMKNFdCBjDosFlWF5aPqzXhy X-Received: by 2002:a17:906:17c5:: with SMTP id u5mr2017194eje.275.1587906957970; Sun, 26 Apr 2020 06:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587906957; cv=none; d=google.com; s=arc-20160816; b=pZGBs1J93yw4cRjkqdkkbHSn3nG/P3PKgbo6UeUE/wI6xlO25fVbyYTLkyPmYidxIH pLueJFycuSgjinrFc1XeigN9Q6Vis8/g6POgXjWPc36SCbFUHqg5sARpqDrcVTxlNdLs E8tm2RHCjGsuA1bF8h1I9Z6ZSit+3r+CcQsEyDqBG+PE60+EdYFIQzwW6TE/uvoovWzW nqXPHZa1UgZp2MeaHJPCc4oVrB3Srh0zqqJbH33iNwbTMU8RgcqU1EJQKvAUGfU1UPGL 5ThoY42Wdw0KQBBEB5fuZ+pf10MxhD9mBBWHeTTY+4NDdFRoQN5YiMa7uE+wT7zLZBSS CFMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=787uDrn1GKfiYBzGItp4S+AGx1cMv9+xaEfuGHB7U0w=; b=DGokYnolKcTqEe14nium/V53lrNDFMwNkwOIQv0VfoB0tpWfTliWuveyHS1JrQqjf3 mmebTh7JPZrYbJEi0TuSmALdZqyGIHvc/mpOIBLjlOxTD2R6yeHl9FoNx/nrfeXHKt2F /8IE2z/LwM5iAYOjOKt/CgsyKhuHGWXvznrs5vFy+xoaIcLbfLCmzLdprEx2yAPaNNPJ NdTfN1xNpRX4OQbIo0gYLzPoNOMsE0MxvjtwelyYZUq7f3fjfz3XYfDcrGfUaM6ZSrtU PtrXnvnU0NBKYcGScWnD9TxC5y/2/JFSp7GZhKxNMqPwNl+ratSIJhDeIb4FtJkjX46b oeJA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si6885694edq.472.2020.04.26.06.15.33; Sun, 26 Apr 2020 06:15:57 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726155AbgDZNMz (ORCPT + 99 others); Sun, 26 Apr 2020 09:12:55 -0400 Received: from mail-m17613.qiye.163.com ([59.111.176.13]:51384 "EHLO mail-m17613.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725974AbgDZNMz (ORCPT ); Sun, 26 Apr 2020 09:12:55 -0400 Received: from ubuntu.localdomain (unknown [157.0.31.122]) by mail-m17613.qiye.163.com (Hmail) with ESMTPA id B18E64825F7; Sun, 26 Apr 2020 21:12:52 +0800 (CST) From: Bernard Zhao To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Bernard Zhao Subject: [PATCH] drm/radeon: cleanup coding style a bit Date: Sun, 26 Apr 2020 06:12:44 -0700 Message-Id: <20200426131244.22293-1-bernard@vivo.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZTlVLS0pCQkJDTk5LT0pOWVdZKFlBSE 83V1ktWUFJV1kJDhceCFlBWTU0KTY6NyQpLjc#WQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NCo6Ojo6Kjg6NElCPhUIM01K GjIwC0lVSlVKTkNMQktNTExJQkJLVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlKTkxV S1VISlVKSUlZV1kIAVlBSkJKSzcG X-HM-Tid: 0a71b69e7faf93bakuwsb18e64825f7 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Maybe no need to check ws before kmalloc, kmalloc will check itself, kmalloc`s logic is if ptr is NULL, kmalloc will just return Signed-off-by: Bernard Zhao --- drivers/gpu/drm/radeon/atom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 2c27627b6659..f15b20da5315 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c @@ -1211,8 +1211,7 @@ static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32 SDEBUG("<<\n"); free: - if (ws) - kfree(ectx.ws); + kfree(ectx.ws); return ret; } -- 2.26.2