Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2733899imj; Mon, 18 Feb 2019 11:09:20 -0800 (PST) X-Google-Smtp-Source: AHgI3IaXAcOBHahjqe0f0ecvKW3W9LtH5L/mHgJG4iV3v5Os3eklBfo+6KboH8IBWZlAa88nhUNw X-Received: by 2002:a17:902:6b4b:: with SMTP id g11mr26223226plt.92.1550516960812; Mon, 18 Feb 2019 11:09:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550516960; cv=none; d=google.com; s=arc-20160816; b=dubQ2zJPWnkcrVkyHQ6z1zTuOkd3QS8FAr3dF/fnIhE54HakBSb9A79nHCF9MdR/ZI fqO2m+N7RjpKEO16ohWMwAYkcnR+OhudfxVfLuidmmI0wi5Qc+hM/czJIgmElGN5OCsc 0cesjrcjw9poduJwVhmDim2ke3poJOyEppbqr7J3MRZ2akJfsCUlMrkPES0c/1OsyR4T ViZALT9AZEZotgIEE2HXul2K0cEXWlNfdgv/bpv745JihLxGd+8l2gM5BAzVCgvYLPDV QrX0uZnSifhHkpcRvs/BiedOWWPlwtlf6ys5qCGCfDogDaDZ41Muh5HcqnLXDkfF8nNd nNsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Rm6F3ZXVgu+JFDSP8uMG86VlMMBEcXUGPJ82DBgLzQc=; b=BPfSMQS52bmGzhYT391O6d6WKCQlvFrMxBGOtVuBgbG8UYxpWlRh991Sz1abO0SANM mKIwPWexqmuSBi+CLJVLL36xvKOSvQlwYYCnkJKqxEW/jX373d+DiAA5SxuGsV17Nrux 9ky6AKMJ9h8EAicTqO8YolROQC7FqMXJwk9kvioqHdYUO3Qs5kU/FUPXsfQxbZR1fVSs i3eH/3oyN0xWevz+BsT9iDCY9DgTJxJtMUR4r8GC+azq24/drwnjAyynQ+LE42xO8Ex5 ccZzSmuGQj4bkXowV6WprAf/iwYfRMOPBIo/qnW/SD8VKGN0mq4s+nNcG7498WxjNpfy COyw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cv2si15930921plb.192.2019.02.18.11.09.04; Mon, 18 Feb 2019 11:09:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403809AbfBRRlP (ORCPT + 99 others); Mon, 18 Feb 2019 12:41:15 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:50836 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389855AbfBRRlL (ORCPT ); Mon, 18 Feb 2019 12:41:11 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 72AA66FEF93DB3252F3B; Tue, 19 Feb 2019 01:41:08 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.60) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.408.0; Tue, 19 Feb 2019 01:41:00 +0800 From: Salil Mehta To: CC: , , , , , , , Subject: [PATCH net] net: hns: Fixes the missing put_device in positive leg for roce reset Date: Mon, 18 Feb 2019 17:40:32 +0000 Message-ID: <20190218174032.22972-1-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.226.60] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes the missing device reference release-after-use in the positive leg of the roce reset API of the HNS DSAF. Fixes: c969c6e7ab8c ("net: hns: Fix object reference leaks in hns_dsaf_roce_reset()") Reported-by: John Garry Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c index b8155f5..ac55db0 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c @@ -3128,6 +3128,9 @@ int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset) dsaf_set_bit(credit, DSAF_SBM_ROCEE_CFG_CRD_EN_B, 1); dsaf_write_dev(dsaf_dev, DSAF_SBM_ROCEE_CFG_REG_REG, credit); } + + put_device(&pdev->dev); + return 0; } EXPORT_SYMBOL(hns_dsaf_roce_reset); -- 2.7.4