Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp328897ybz; Tue, 21 Apr 2020 09:47:16 -0700 (PDT) X-Google-Smtp-Source: APiQypLRc4fbgO6ei6NbF2t3HLVhoq1Svx1+fN7QYDYC2ddyQFjpuz2b2KNpNMt3dtlLK6ZkEevp X-Received: by 2002:aa7:c401:: with SMTP id j1mr19211486edq.31.1587487636687; Tue, 21 Apr 2020 09:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587487636; cv=none; d=google.com; s=arc-20160816; b=GMbx+rjmpQ7/KLwTo4QzdRfec0sgJ+OUmMhXaJCAmzYNvpx2i5Eeysic50uZBj7HjO eqQFB2qs3XKZsY+m4DM7qlI/MUxfubFtILc+JnfykRrd4TyRzBFOPBl2kfwcl+KtdK3Q PwIFI/apNVTo3DJc3avtyFqmSIfKf+HKn6FzLQSLXxUe6AOQdy0bjIgpvuCnD4VpS6E3 X5Li7wXuieiSbIIPSIKk/4TSFehUGqT6f69X3YVc41yk78eUa37fIRBRCvTwu/pE7ApE 45i0WHKOsCh7wwt8dee1MM6h2s57TcjlFRlg3OgawWSU0gE2fDvvknLUVs1zEzoCYZCh vRcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dkKRjvPolkdN+Xm1/24QKsRrOCdugSbTYL+Ykb1FDCo=; b=DYz+xIyU6Z2y5k/gEF/DCgqR+y8yu0OvFmv9nBbAsigauMOwT5sqcuG/FVmd7rMNUu 7oNuZCAzE15JPUfWdUH5jSAjLF3KFuGaD1kR0IvHv1QNRt/o5eJJ7mIy1UNcj0XnsNx8 eIc5A+vk1Igc98JPNefRMs8aKDaVOgALsQpORcM8kmmjvAm7j+25A7wGydtBwTZ6ZwgO +B/XyOHSpKt0toiWhZV0Z+0T1LroClyzRqK4D3ozlsS3wSj+RP84LUBnW42w0lZb+uNO kbwBv7+TSlPxrkq8AKxj5drKeocCXVJGSo6IZE6Nk3Loa3SeMVileVp4xcMiCGnyr6jJ pdxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="B2N/BJbg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si1827255ejm.490.2020.04.21.09.46.51; Tue, 21 Apr 2020 09:47:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="B2N/BJbg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726063AbgDUQpw (ORCPT + 99 others); Tue, 21 Apr 2020 12:45:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725870AbgDUQpw (ORCPT ); Tue, 21 Apr 2020 12:45:52 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09B7CC061A41 for ; Tue, 21 Apr 2020 09:45:52 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id nu11so1583855pjb.1 for ; Tue, 21 Apr 2020 09:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dkKRjvPolkdN+Xm1/24QKsRrOCdugSbTYL+Ykb1FDCo=; b=B2N/BJbg+oipDuuEOBfnU5D/XYc6sWk8sb9VJi8vR8iB5YmcJCPG7/gBesD+9EvChX P7kzpgmrXvDzCIiBUOtt/k264UAk9f+yMho3icl19QaFfrRS/qmY+y+L3gTyzpsNP/RR t/ieyjgMNqu++s8hbJXwi3osDm/xt3XFPk1U27V/akXBXLcc7u3aoomrlyXmWeqExnrb ZiSPfgmqaz0OA/WW2BPxF2YT1DliXTIBK4Q2Z0FAgNjCAXWhdg/Bq8zYYyxMUVtCCtRT 9ZMFdM/6CLY2mhhBjG+2Gmd44bn4QHLlbe3+U061qZ66C3YjX9/MS2k+xSIdkSOx3DKf UOkQ== 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:mime-version :content-transfer-encoding; bh=dkKRjvPolkdN+Xm1/24QKsRrOCdugSbTYL+Ykb1FDCo=; b=Hw3bOUwVLcCa2vDe5KPqwZBtYTM8knItEvXspgi5SJZakilpbHyZ+NfB3GYITk74Y+ siIDcDIb9qqci0a04rZzBBZXD+C1hxLMsynCRH6ph8iYVNKkZjE05ZdtAAdqUu++cLgX 1DtvgfIZrA8mpvU8RmuMQ8kGrYPfCpBgmkDgcDIpnP8uk7sE8uqiH95OoxxKLxImpilo XmlgDvtYj0oHWXDuFLILexAz611vZwefLNjt4UP3M9+jNtS+wpT5/etRRaD7MqHF077R PBqQnp4tb/0ESLN3u+ZQlzu5yPof5SXaLOLWSUnG5qJPANAGffn8szgK2k99BQhKDS0s 1XcA== X-Gm-Message-State: AGi0PuYu7FmVF7N2pbsBkvnsvm+Z8eK2l6V8McOzV5+UxURPAl8yeNx+ nFmc2vvqJor8Szl/PQ1lVKI= X-Received: by 2002:a17:90b:297:: with SMTP id az23mr6439510pjb.85.1587487551539; Tue, 21 Apr 2020 09:45:51 -0700 (PDT) Received: from localhost ([89.208.244.140]) by smtp.gmail.com with ESMTPSA id p2sm1948574pgh.25.2020.04.21.09.45.50 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Apr 2020 09:45:51 -0700 (PDT) From: Dejin Zheng To: kraxel@redhat.com, airlied@linux.ie, daniel@ffwll.ch, virtualization@lists.linux-foundation.org, dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Dejin Zheng , Andy Shevchenko Subject: [PATCH v1] drm/bochs: fix an issue of ioremap() leak Date: Wed, 22 Apr 2020 00:45:43 +0800 Message-Id: <20200421164543.16605-1-zhengdejin5@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It forgot to call bochs_hw_fini() to release related resources when bochs_pci_probe() fail. eg: io virtual address get by ioremap(). Fixes: 81da8c3b8d3df6 ("drm/bochs: add drm_driver.release callback.") CC: Andy Shevchenko Signed-off-by: Dejin Zheng --- drivers/gpu/drm/bochs/bochs_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index addb0568c1af..210a60135c8a 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b/drivers/gpu/drm/bochs/bochs_drv.c @@ -138,6 +138,7 @@ static int bochs_pci_probe(struct pci_dev *pdev, return ret; err_unload: + bochs_hw_fini(dev); bochs_unload(dev); err_free_dev: drm_dev_put(dev); -- 2.25.0