Message ID | 20200323144950.3018436-7-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=Atw5=5I=lists.freedesktop.org=intel-gfx-bounces@kernel.org> 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 D2293174A for <patchwork-intel-gfx@patchwork.kernel.org>; Mon, 23 Mar 2020 14:50:21 +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 B0A4820753 for <patchwork-intel-gfx@patchwork.kernel.org>; Mon, 23 Mar 2020 14:50:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="fhWjLk7V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0A4820753 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 441916E14C; Mon, 23 Mar 2020 14:50:11 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id A68AD6E134 for <intel-gfx@lists.freedesktop.org>; Mon, 23 Mar 2020 14:50:06 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id 6so14956539wmi.5 for <intel-gfx@lists.freedesktop.org>; Mon, 23 Mar 2020 07:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kbtfsp0R5FIBBIayH8FrOzfPY5PeSem4zC0AulO19ao=; b=fhWjLk7Vc+QyE3oZmJCqXJgVUKzPSQAWgE1p3EYV6TkUYaHdzRuHgeHTQt1rcgNmK1 x079Igf60EYWrI2wSX3fA3EF1aM0kNfkUpaj0WMZKksfLVkuFmYVy4Npa0nQsEWi02AT rwoezWWdF/zmqYJHs1F1QGk3y3vKjOWbCOp6c= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=kbtfsp0R5FIBBIayH8FrOzfPY5PeSem4zC0AulO19ao=; b=Wpx+eeZrFUDQVAgl0VTnaki/mFAgdZzgNUUy5xNUDgGKIQF5W2d1a0Z1m7zuXkzIb1 tQ0DxVMg9VG6/xV2HiX93k8u7UjyGZV1YW81drvgiMb/mZF895DEPW9b45RUdTYumXFk YZlMrRMM/kxiiZTjFycpaYwf8jp4frbyik3sSMrYPmyENwdbQXf+q9iBVnBluGM6QaVB aMXqbaOzxm5EwxRA7/6RjwnTbSPESHAVzZsZpeOoYSY4hCj89iTCJHwwIoxKpIGpDtin iujn1xA5g7IXl5aQDTV0QNzEY4ZxGqm69aSxPIhEeqVOu3k+xNj/yNl4fkUl+gJxSWtN Kgvg== X-Gm-Message-State: ANhLgQ0Y8VNbSdFCwvoJcq8cfJkHAZcz1lSW6JiYRYFIDWhnWb/nvdbe 5z3Veudp76uUuuY8+hzstKMSGA== X-Google-Smtp-Source: ADFU+vuvVzo+09P6HiP33K2yl048cpXbnVs2u0q+PzkPsxuNL8OMXEVxX6njLavxDrR0kUIePMjoRA== X-Received: by 2002:a7b:cb03:: with SMTP id u3mr26069150wmj.12.1584975005306; Mon, 23 Mar 2020 07:50:05 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s22sm20376522wmc.16.2020.03.23.07.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 07:50:04 -0700 (PDT) From: Daniel Vetter <daniel.vetter@ffwll.ch> To: DRI Development <dri-devel@lists.freedesktop.org> Date: Mon, 23 Mar 2020 15:49:05 +0100 Message-Id: <20200323144950.3018436-7-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200323144950.3018436-1-daniel.vetter@ffwll.ch> References: <20200323144950.3018436-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 06/51] drm/udl: Use drmm_add_final_kfree X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development <intel-gfx.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/intel-gfx> List-Post: <mailto:intel-gfx@lists.freedesktop.org> List-Help: <mailto:intel-gfx-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=subscribe> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, Intel Graphics Development <intel-gfx@lists.freedesktop.org>, =?utf-8?q?Nor?= =?utf-8?q?alf_Tr=C3=B8nnes?= <noralf@tronnes.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Thomas Zimmermann <tzimmermann@suse.de>, Dave Airlie <airlied@redhat.com>, Daniel Vetter <daniel.vetter@intel.com>, Thomas Gleixner <tglx@linutronix.de>, Sam Ravnborg <sam@ravnborg.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" <intel-gfx-bounces@lists.freedesktop.org> |
Series |
drm_device managed resources, v5
|
expand
|
diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index e6c1cd77d4d4..6a5594946096 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c @@ -10,6 +10,7 @@ #include <drm/drm_fb_helper.h> #include <drm/drm_file.h> #include <drm/drm_gem_shmem_helper.h> +#include <drm/drm_managed.h> #include <drm/drm_ioctl.h> #include <drm/drm_probe_helper.h> #include <drm/drm_print.h> @@ -38,7 +39,6 @@ static void udl_driver_release(struct drm_device *dev) udl_fini(dev); udl_modeset_cleanup(dev); drm_dev_fini(dev); - kfree(dev); } static struct drm_driver driver = { @@ -77,11 +77,11 @@ static struct udl_device *udl_driver_create(struct usb_interface *interface) udl->udev = udev; udl->drm.dev_private = udl; + drmm_add_final_kfree(&udl->drm, udl); r = udl_init(udl); if (r) { - drm_dev_fini(&udl->drm); - kfree(udl); + drm_dev_put(&udl->drm); return ERR_PTR(r); }