Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp472075yba; Wed, 15 May 2019 04:44:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzp2DXZYXkeDExP/u159HnlCVGPD8QfsWJQs5PWTzDdQe7XPhvq09JQFFJvR2X8AUQQAEVd X-Received: by 2002:a62:125c:: with SMTP id a89mr46613337pfj.93.1557920664946; Wed, 15 May 2019 04:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557920664; cv=none; d=google.com; s=arc-20160816; b=fhEToHuVcdmLVQB7yEMlmnJWwA+kp6Dzb7zsio+iQscQEmZIouCi8u0EZp1wvfPE+H bce/irfHOL6JWuREiHCmHPALVjybPV6Q0V1i1U3noLSZZ1nMUt901/88OReratP6GHOI 1p6N+4w6ujE0bpLmVSovRsmjp9LvwNQx4zYWb1p1+dMsGmPvtLllSCSA5mT8YkzAH/2C BdXnBqE9tfEt9kJMKRwgGteHxm91ExYA7X6qM+CrDoZlstlhwX/qVtjBIFurQchU3CfV L99/4wLAuMmwm5wB73LHt5qL0ILg3npqzU7Z6MyNks6DnNhj2EcILpcjhmF8nlJ9VhvC ToiQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o1J2db3YHG6WZSTHaqIuMTKjVMdRAhorCjyu0xvrNOA=; b=uOf/eNs51YopgQK3rKOFcSlCNCQfZhcm2wQzeC9m221QECmXSeyKhr7+tMXbAUUPru MhyHEgj9GQpaXFTLvQLo+E+yKjvfMoYi02jL6OtP0liBTvuR8n6jaCkcYBS2hcYgGIkv es/1oEnThIM/veEEjje52w/KxzjdTMxTlzxsDalb06uqyvzfImVT8n3608zsXr+FUfys p8leuQ88K/cewADyVneOYOW1x6Qkm+JoGEf95n/WFt1m1lbXn3tRP2tG8pzqjTahNuAV lz/ehwWrTHXzmA/JfxBZmJCiWuu8HkmMyVRdUZKctu1mqvIfki/skYba97ysgPi64OE4 7dzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GE4dhFCG; 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 v4si1512607plp.404.2019.05.15.04.44.09; Wed, 15 May 2019 04:44:24 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=GE4dhFCG; 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 S1731825AbfEOLlS (ORCPT + 99 others); Wed, 15 May 2019 07:41:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:40128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732458AbfEOL24 (ORCPT ); Wed, 15 May 2019 07:28:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8DA8220843; Wed, 15 May 2019 11:28:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919736; bh=8ezDlsKr35RmZhEH5S5vIFwp/wkEY5n5UFVlWdhEcIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GE4dhFCGy/ZkX/YegIWAdDxgMDHDXG2iwrf9YH7+Wuw9SXxdRpDLwEDphMxMuQ7mf KwMzCEXHDTvQGIDJ88kHuPNekwzWOcLagUX+sCuWz+kaskrK7AYb8Rs69zyXY7OyEt urTBDuky3zWeDkPLMo/uDrU5ZE32rFDvmUgQECMw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Kocialkowski , Maxime Ripard , Sasha Levin Subject: [PATCH 5.0 072/137] drm/sun4i: Set device driver data at bind time for use in unbind Date: Wed, 15 May 2019 12:55:53 +0200 Message-Id: <20190515090658.660331445@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 02b92adbe33e6dbd15dc6e32540b22f47c4ff0a2 ] Our sun4i_drv_unbind gets the drm device using dev_get_drvdata. However, that driver data is never set in sun4i_drv_bind. Set it there to avoid getting a NULL pointer at unbind time. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190418132727.5128-3-paul.kocialkowski@bootlin.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index 9e4c375ccc96f..c6b65a9699794 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -85,6 +85,8 @@ static int sun4i_drv_bind(struct device *dev) ret = -ENOMEM; goto free_drm; } + + dev_set_drvdata(dev, drm); drm->dev_private = drv; INIT_LIST_HEAD(&drv->frontend_list); INIT_LIST_HEAD(&drv->engine_list); -- 2.20.1