Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp341524pxb; Wed, 13 Apr 2022 02:14:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyC+r0LuEUnuGYyUJNqsoYutVpfwlmclkYNumXwz+pChPWKHXMqr+m037NBo6YwNiJ1sZ3K X-Received: by 2002:a17:90b:4b89:b0:1c7:d452:4bc1 with SMTP id lr9-20020a17090b4b8900b001c7d4524bc1mr9735242pjb.134.1649841246962; Wed, 13 Apr 2022 02:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649841246; cv=none; d=google.com; s=arc-20160816; b=UbJhrThkLIUtNUV320n+zJppzCuCQT0AkTY2FG6IJfLkF3TV8EOPr8k9pZDvxWKyRF xWth334pc+RgU6Sj966BDexWJE9PBT3V3dq5rHmujSLZ8F3N0eM+rXtqvRpTUX9w3KPn dhD1otcq9+gNwoobxqPlNniT/50mIzbrKeMhmauRyyAerTNiEeaxzVN2VbFlmdElf6Pb 8X0WxU3PoWcCxNEThFui72+S/n2qpUQOiRWw/uSOi097iZtMXGVc83vjd74LjFNTVU90 sLTeSf17tNDesHDRZhppbuuJ07whHE2Qgbzau6yrNqCEjCnswMutrOoxoRmSzUThP4D8 qEjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xq0DBRRLDqYeeo9ZuXiFrw91M+Bulw3iR7DHGNuPRto=; b=CMwUwNlajTFLlGNO7/pOn0nRLGJ+LjUqqhAjqlWCWdHeBIuUM4ElYV6RokRPPxK8yO lcWyCzu9D01fdeCcaVcPIp+NENCbi4U7Ot92y4gt+YsG/Ta5NL7auyBfAmZa6MKCuPXh uYBIFwaL7FxdsZDU8EXCAl3e6jQm1Xn96hTrWZvzdxuDG1YBsQMDoy8HTFaXpT9f7I2l hrDh53JuhxUzvLh5lzoCl0Tux4f93XDxQElqRkebNnpEWqQQ3pKodnBQRt30zBC314QW T0oFXGW4qfj72Em4IOB5okIHQM5DzpJJoyjhE6r9Gx67dg26xvGzT0YqC6CFRCQb1DZA sMoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@126.com header.s=s110527 header.b=PETy5mHL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=126.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a170902d50400b0015495894d28si2433307plg.412.2022.04.13.02.13.52; Wed, 13 Apr 2022 02:14:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@126.com header.s=s110527 header.b=PETy5mHL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=126.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233119AbiDMGv3 (ORCPT + 99 others); Wed, 13 Apr 2022 02:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbiDMGv2 (ORCPT ); Wed, 13 Apr 2022 02:51:28 -0400 X-Greylist: delayed 302 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 12 Apr 2022 23:49:06 PDT Received: from m15111.mail.126.com (m15111.mail.126.com [220.181.15.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2DC162D1EA; Tue, 12 Apr 2022 23:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=xq0DB RRLDqYeeo9ZuXiFrw91M+Bulw3iR7DHGNuPRto=; b=PETy5mHLPsEbDZN7fFmyW DADf7hZfegmsqcS1MRpwzwhhdwx+o1UQ47TvGN9cEMxp2g1AH9EJU4S9+TyuzPcm +PCvWMzQXoyQJfWMAEXWu+9SS+j7/apWbCUx3z+YZwSEGtnljEG2UGt4g8sOyJK+ fop8xZqAkWCb4T61GOOAas= Received: from ubuntu.localdomain (unknown [58.213.83.157]) by smtp1 (Coremail) with SMTP id C8mowAA3Rze8cVZiR1HWAQ--.11201S4; Wed, 13 Apr 2022 14:46:20 +0800 (CST) From: Bernard Zhao To: Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: bernard@vivo.com, Bernard Zhao Subject: [PATCH] drm/tegra: remove useless if check before kfree Date: Tue, 12 Apr 2022 23:46:18 -0700 Message-Id: <20220413064618.23974-1-zhaojunkui2008@126.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: C8mowAA3Rze8cVZiR1HWAQ--.11201S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7JrWxKw4rtFW7Xr1UXFyDtrb_yoWxCFc_Cw 40qr97Ww48u39rJF1jyr43ZFW0kFnI9FZ5ZF9Fgayftw1DZw1kA3429r1rZ3WUCFWUXF1D Ja4UXF45X3W3WjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRN7KsDUUUUU== X-Originating-IP: [58.213.83.157] X-CM-SenderInfo: p2kd0y5xqn3xasqqmqqrswhudrp/1tbiLR3hqlpD9ZpaGAAAsP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch remove useless if check before kfree. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/tegra/submit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c index 6d6dd8c35475..54ac31bc80f6 100644 --- a/drivers/gpu/drm/tegra/submit.c +++ b/drivers/gpu/drm/tegra/submit.c @@ -639,8 +639,7 @@ int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data, kfree(job_data->used_mappings); } - if (job_data) - kfree(job_data); + kfree(job_data); put_bo: gather_bo_put(&bo->base); unlock: -- 2.33.1