From patchwork Sun Jan 19 09:23:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 3509021 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B53979F2E9 for ; Sun, 19 Jan 2014 09:24:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C205F20127 for ; Sun, 19 Jan 2014 09:24:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E2A692011B for ; Sun, 19 Jan 2014 09:24:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751992AbaASJYI (ORCPT ); Sun, 19 Jan 2014 04:24:08 -0500 Received: from mailp.voltaire.com ([193.47.165.129]:39973 "EHLO mellanox.co.il" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751189AbaASJYF (ORCPT ); Sun, 19 Jan 2014 04:24:05 -0500 Received: from Internal Mail-Server by MTLPINE2 (envelope-from sagig@mellanox.com) with SMTP; 19 Jan 2014 11:23:59 +0200 Received: from r-vnc02.mtr.labs.mlnx (r-vnc02.mtr.labs.mlnx [172.30.0.127]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id s0J9Nx0d007799; Sun, 19 Jan 2014 11:23:59 +0200 Received: from r-vnc02.mtr.labs.mlnx (r-vnc02 [127.0.0.1]) by r-vnc02.mtr.labs.mlnx (8.14.4/8.14.4) with ESMTP id s0J9NwIC027550; Sun, 19 Jan 2014 11:23:58 +0200 Received: (from sagig@localhost) by r-vnc02.mtr.labs.mlnx (8.14.4/8.14.4/Submit) id s0J9NvZu027548; Sun, 19 Jan 2014 11:23:57 +0200 From: Sagi Grimberg To: nab@linux-iscsi.org Cc: dan.carpenter@oracle.com, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH] IB/mlx5: Fix smatch warnings Date: Sun, 19 Jan 2014 11:23:57 +0200 Message-Id: <1390123437-27517-1-git-send-email-sagig@mellanox.com> X-Mailer: git-send-email 1.7.8.2 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Possible double free on in-mailbox. Signed-off-by: Sagi Grimberg --- drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index bc27f6b..f023711 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -1050,13 +1050,13 @@ struct ib_mr *mlx5_ib_create_mr(struct ib_pd *pd, in->seg.flags = MLX5_PERM_UMR_EN | access_mode; err = mlx5_core_create_mkey(&dev->mdev, &mr->mmr, in, sizeof(*in), NULL, NULL, NULL); - kfree(in); if (err) goto err_destroy_psv; mr->ibmr.lkey = mr->mmr.key; mr->ibmr.rkey = mr->mmr.key; mr->umem = NULL; + kfree(in); return &mr->ibmr;