From patchwork Sat Nov 9 07:54:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuhong Yuan X-Patchwork-Id: 11236445 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1609914ED for ; Mon, 11 Nov 2019 02:29:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1BAA2067B for ; Mon, 11 Nov 2019 02:29:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1BAA2067B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C9966E81F; Mon, 11 Nov 2019 02:29:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9CA856E13C for ; Sat, 9 Nov 2019 07:54:28 +0000 (UTC) Received: by mail-pl1-x643.google.com with SMTP id d7so3446944pls.3 for ; Fri, 08 Nov 2019 23:54:28 -0800 (PST) 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=veiAcMlIgcLHjJxd0QNhUHza9s431ffRaEJpWcEHXlA=; b=dF08QzVbu2yYhpf6zfJ0PJ01r+9DTSNHafPSYQIF+2Ajtkq3W3ZAAx11WAqbquhlQl VlTWxNS0lWliy99dYqvROwnDRIyKeTH4iar+gVhb19VtBpGQj6PEUImHf2cUp0DwFASH 53Y8GWSHv6GPQyVRCM8/uPoM2p29rn+qhukELR+zxeYHgvBc7/P8ewXiJChjr2PmDGi3 GuaZTrskRehjRw5a0umfoO+pFsRHCT7c5OR853jNbeDX4Vyuxmbzx9rDe5qFjQwHZZYH dZHtsnm7MRtT+ET7yE83dMtODr49TM7f51LU4/zT1k5UDYxdZXWqJoI1MGyfF9ZJwISW k71Q== X-Gm-Message-State: APjAAAX4Vte9s6ps/eNM9o6L3FHDRAypRphaFejULxfnlonvimV3gsNU g3rkC/Qi/aLiz/TtPsnRTto= X-Google-Smtp-Source: APXvYqxvItN9OnqheTvov4hpS8eX99Ly+f08T42CJNk7Az9Z5y+C87MbZqWmuka9RwkjJGMYYz+pvw== X-Received: by 2002:a17:902:6802:: with SMTP id h2mr14901704plk.135.1573286068169; Fri, 08 Nov 2019 23:54:28 -0800 (PST) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.gmail.com with ESMTPSA id y1sm9578671pfq.138.2019.11.08.23.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 23:54:27 -0800 (PST) From: Chuhong Yuan To: Subject: [PATCH] drm/virtgpu: fix double unregistration Date: Sat, 9 Nov 2019 15:54:17 +0800 Message-Id: <20191109075417.29808-1-hslester96@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 11 Nov 2019 02:29:25 +0000 X-Mailman-Original-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=veiAcMlIgcLHjJxd0QNhUHza9s431ffRaEJpWcEHXlA=; b=ZrcVhD0E25ufPrmCCfZ8MdFHm7QQe97Zw1uyYMICsTUBdeTTZku7sXrCkCp00Y8WTj ssQNLd0wY4j5kVeBQOlyt+J8HxJQUV2+ZycfVCAFWt7NyqBsvWB60WV5wR8rfkQ2VY2N 0K8O05POwFRF8UJTOljz9j40NxSX5E+k/TK+lMU7/7BG+Vfszm9WfoA7Kd13lSB/6FiK lOOu0ERBepCRgVwSyr/vXyegHkDjSp5ve0mC23B5Ju5n21ilfXQILL7E5RNlxV5IHaoC y95+fHo5YQQJQAT9NgMuHZ3tNSjwcx/qcRUnusSjy3QvTQpKL3rs+v2rC60U/EZI5Ozg 4njw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Chuhong Yuan , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, Gerd Hoffmann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" drm_put_dev also calls drm_dev_unregister, so dev will be unregistered twice. Replace it with drm_dev_put to fix it. Signed-off-by: Chuhong Yuan --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c index 0fc32fa0b3c0..fccc24e21af8 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -138,7 +138,7 @@ static void virtio_gpu_remove(struct virtio_device *vdev) drm_dev_unregister(dev); virtio_gpu_deinit(dev); - drm_put_dev(dev); + drm_dev_put(dev); } static void virtio_gpu_config_changed(struct virtio_device *vdev)