Received: by 10.223.164.202 with SMTP id h10csp299227wrb; Wed, 22 Nov 2017 07:23:54 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ+K55ct2YQyyfvj2Qx+zbRymbJxkdT8K4CJYgdPL+WqQiZcdhHkbk/tiObDSqizPBj9gsU X-Received: by 10.101.88.76 with SMTP id s12mr21368520pgr.215.1511364234414; Wed, 22 Nov 2017 07:23:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511364234; cv=none; d=google.com; s=arc-20160816; b=LP7Znp0NdkxebujNVawXgBz/zA7E3vkv4rDbn6SeUpJa0u5VFBl1ImlQR8fQnYjKlG m1sbRZ8HU3i2LvSArNcJWL9D02kQXxUe8eGDZ+DhbaDQ7VLhJxWeqJqYkE9FfWvhUqG3 KP74yywEgBNxzZJWjLOF9JTn2kMYG+E7mOiLIsoQfFvenyP2rXViEb9f2u3YAfugKOjH NLcatOgmjThXYX2/NG1m9OZkFbbVzBfrPnBSjTVgBZFtJ8G7bvkFJyRupKlrpwwuyOFg 9S2O+rkxeHQyjf92JKyGzK0vReR/VG+UYa/Xg+Wi9kyMGYG4oxo6NZYNQPE9JQSer9VN GqdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=2gc1fUwf3PKOvA746rFGMUElzJVMezTUavpYPjV/+ms=; b=SPhdfOKzibzDCycclgrQc13+ublkNSlgXJ6sWn/DVPNY8Y8Gg8hHPvO/P5RTO2kzh9 o73yLf/mfcZS7b5TZE4/+U5IQnp5408t0lB5nAxGbW7p1zz2lkvR8HWjloTdO0gX1WMn R12qe+8EKthHk0KJYDWphYD1eb9Sorpj4HV+Ov85+mB/kcVxqnuH2ywVe8+sXBQsSuqA nVuacno069Z9eJDuGIZ5umuh9J1YZcv5fKYSbB61yrH7KKs/BKoPg4hifo5VzysD/7/B KLKVgsFIP/lV215zezH5AVKoU/xUhON1tM88C1BqWnJll0jZXWAZPt9v6VkSTOl4JKBi b+Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A3NAcuIV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a18si14068926plm.225.2017.11.22.07.23.42; Wed, 22 Nov 2017 07:23:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A3NAcuIV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbdKVPWz (ORCPT + 77 others); Wed, 22 Nov 2017 10:22:55 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:38183 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbdKVPWw (ORCPT ); Wed, 22 Nov 2017 10:22:52 -0500 Received: by mail-lf0-f65.google.com with SMTP id c188so11163457lfd.5; Wed, 22 Nov 2017 07:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=2gc1fUwf3PKOvA746rFGMUElzJVMezTUavpYPjV/+ms=; b=A3NAcuIVXe7R+lQkTYThizUE36FZB6oQ7aYwbAZiRurG9LSdcqMgr2bFRXAew1EGRt WYoRbbNGdhIxiut13VuhhJ/V7UaA8IZic0bVl/oaXjR5EvQWZ8rXChb1d7jtpyTeT+OX Ga3DtqrDUTkHooX7d5Rdiu2dd1bqRCl650NAbaNOta31TAp2U5oRxRygN8BjdCDs7xLB c+IPNvXK0O54hgp/SPt909S+e3ELFCg93dG/Nm0fWdGbcxWo7fOOr77OUJesJ02wx3Ik js19whs2JzzyM1MD8ThCqVY5zpX3bJvxg4+GBuaqfoX4cKGgr2vCt1q4MS/MymgpNIgf TggA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2gc1fUwf3PKOvA746rFGMUElzJVMezTUavpYPjV/+ms=; b=XECuohlABWMJlmu/+qWiD55OX1CwjslYlfW3tnDpcT+Qq+Gtc+xx0kZ+zGLUOfnJV6 fUv3VOMa67cRQXS1Xl0Vkl7wf6LkvVtlxV1r8CG35CT0BrAh01fHOnJlD4zACVM2oKJr nVPl2aoxc8aS9p1sfAnzHniiiEyUmWi2buEm4GPXdBAHg5nh5f700iqB52gs2S96kv5R xANAWMtw859SpNTgeObJI/O2ILyzQ0CrYfx3T4fMvJAVtmycKUXSdrdSTnLIfK7pkwlH C0C6RHdcRmgOpWkXXd4cajvifhW9yYwzMZijVDHkGkL3hNXwKQ5qBRV8B0bPhi0YjxhE 6sRg== X-Gm-Message-State: AJaThX5nMuC8X+Ao4S5CgQnUErj4QQ1yGqcwXEM+cSLktipIY625uN9a rqpGO8/io9+UVxaGFlD4unCoqQxA X-Received: by 10.46.4.207 with SMTP id a76mr8193983ljf.6.1511364171353; Wed, 22 Nov 2017 07:22:51 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id a71sm3694483ljf.6.2017.11.22.07.22.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Nov 2017 07:22:50 -0800 (PST) From: Vasyl Gomonovych To: sumit.semwal@linaro.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] dma-buf: Fix ifnullfree.cocci warnings Date: Wed, 22 Nov 2017 16:22:41 +0100 Message-Id: <1511364161-6074-1-git-send-email-gomonovych@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NULL check before some freeing functions is not needed. drivers/dma-buf/dma-buf.c:1183:2-26: WARNING: NULL check before freeing debugfs_remove_recursive Generated by: scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: Vasyl Gomonovych --- drivers/dma-buf/dma-buf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 4a038dcf5361..048827b06c03 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -1179,8 +1179,7 @@ static int dma_buf_init_debugfs(void) static void dma_buf_uninit_debugfs(void) { - if (dma_buf_debugfs_dir) - debugfs_remove_recursive(dma_buf_debugfs_dir); + debugfs_remove_recursive(dma_buf_debugfs_dir); } #else static inline int dma_buf_init_debugfs(void) -- 1.9.1 From 1584940339063732670@xxx Fri Nov 24 09:48:14 +0000 2017 X-GM-THRID: 1584613544307210227 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread