Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3343191yba; Mon, 6 May 2019 22:53:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlGjg5g2l+KGJZpxSlADtuUdUWVOVHnayqJNmwHfdaa1fx7Fe4cDgbMTRi04S26jqsbaPo X-Received: by 2002:a65:44c7:: with SMTP id g7mr32971936pgs.399.1557208408236; Mon, 06 May 2019 22:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557208408; cv=none; d=google.com; s=arc-20160816; b=dxQ51oxbz9EAB63+EOiabutG5GeYpnjEpq53D5eML/02wPT0f5XIdwn18wdA5lDTEx sA3uegMjyf8a4XOoKiS6zveqcly684q8uhqBWKuQ20bYdjuBDa1wkAY5mcPrVDtry+j1 4sVTx/r41r6zYDbY+s/klLLh+P10bi9dDc6K16MoD5+RGXBuwHAxCZmv/11fgoRLhWM5 kAeWQrI05Qd3nehRU9sDzy4o1gmysm1qxgBjeeEv/25lQKzQ2GRO7/XSgB4nIEotJ6vM lWjXTPNUrJybmYCh0FczIJOqXRdQMivfqnP45YQaXSzLllwJlST1HWV1VtHc6gmzmOym GWIw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Xp6vsC+8R+IG//vpQg5FjxxdtlecQCd6U9+rO9LnLrs=; b=ZLOv68Y/Hh+KlFirHKisBwq59WPH+0aGLabrqwrdZ+JMXjGPpgPAf4rVKlNs+bx8PO 3V16IB5xg0WDgVEMarY9Z7rfUAlARU+1no/5BJkt3fbBKMrjz1LJFW0CwaR3y+LE8yki 9TsQ2sQRWiHNHjW73olidPqhjvvLBZyUpNCz1Ef6/n9EXIJDj8TTC2/8AQzXSSLdb2Z6 tK/Z0pAxYImHap2kTOgQkH1Jbdy5pch8Xbn19oiNM0DzMb7GTRnNkYNn/5kpFH2bJVGF BQIZRs9BVvZkQab0lbGPuiwRhj2xChZvUQrCpII2+8QDuGDOopGHHGTpV2NjSy9fXYg9 WwzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="YcZFyZ/b"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si11255522pfh.239.2019.05.06.22.53.13; Mon, 06 May 2019 22:53:28 -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="YcZFyZ/b"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728866AbfEGFj2 (ORCPT + 99 others); Tue, 7 May 2019 01:39:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:59056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728402AbfEGFjZ (ORCPT ); Tue, 7 May 2019 01:39:25 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4CA7A20675; Tue, 7 May 2019 05:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557207565; bh=FSFqdbn+Yk9ZtVY/0EwJNaARZW+n+i2voT5o2zoa3PA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YcZFyZ/bKuVeEtJMxAkFGhQE4/uzPk/hKHNNvCzoqrenGfSRG2wzXuAsIpk81AqED NOCJD9nl9SOlicJ8Gb0KjpF4WtgOWnRkeGLI15/r1QRCWYXK2sBFhTE6tRMZevqjNn ObNScxpCmNPY/frblleaVVk0UsNkON745TNXL/hU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Paul Kocialkowski , Maxime Ripard , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 4.14 28/95] drm/sun4i: Set device driver data at bind time for use in unbind Date: Tue, 7 May 2019 01:37:17 -0400 Message-Id: <20190507053826.31622-28-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190507053826.31622-1-sashal@kernel.org> References: <20190507053826.31622-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Kocialkowski [ 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 8d3c8070ed86..e09161cf312f 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -96,6 +96,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->engine_list); INIT_LIST_HEAD(&drv->tcon_list); -- 2.20.1