From patchwork Mon Feb 18 17:40:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 158636 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2755054jaa; Mon, 18 Feb 2019 09:41:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IYsGYksAGiVzIYpkNWYHJQI90BsMVVrvYyIRVvXPXL96WL7WHd24fYKiZnSevQWtHS+o/Pn X-Received: by 2002:a63:4a11:: with SMTP id x17mr4547488pga.376.1550511678151; Mon, 18 Feb 2019 09:41:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550511678; cv=none; d=google.com; s=arc-20160816; b=QEcDJKMcY2a8P4LbWVZLnDwK0uuyi5Wk+Jq3XkMsZhA5UEevXjR5pR3E70P23EkVhI YFvkIsQXlGCO0epXBud4icxJQW8oh2KFfi/XsUanh+gjiRi79Ox71rt8KGCJjHJvpeLo amoShzPX+968Cj7gRrMqASM8njhqt9HQt/PZRe5OnyBSFqIEyWAus91fEP5hRWjinm3l pBFGiwJjQDhuuoHFtysLooOZNMGW8AqSqswllL03HNw68yWyOC+Yx1Yb52iQgdlQV+Iu mi4k5/eVbIC8hLxtC0ZqGCq2mKImY8VHd4gmcsVyplURw5/5oeGyrbnmSXpmNPGb55Rn M8ig== 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 u129si8930025pfu.117.2019.02.18.09.41.17; Mon, 18 Feb 2019 09:41:18 -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 S2403814AbfBRRlQ (ORCPT + 32 others); Mon, 18 Feb 2019 12:41:16 -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 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(+) -- 2.7.4 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);