From patchwork Sat Jul 8 20:03:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 107231 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1614460qge; Sat, 8 Jul 2017 13:03:32 -0700 (PDT) X-Received: by 10.98.106.6 with SMTP id f6mr37976712pfc.53.1499544212090; Sat, 08 Jul 2017 13:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499544212; cv=none; d=google.com; s=arc-20160816; b=j4e29dLZhNSbF9EnOCjCS+1Q+VMAdEi7ji1oIoT/n4I7EH9zUMRHa3lAi549Bo8+4I 4QfeFj1yy1fEZXR+Qnk62yLzpJw2dHaAV1FfulFGuQn6cM8jYkMps16CTy3wbg3yOEqA pGeGZIZzXwdqF0jrf269WUjMoUuniu1ZbS0d0CtdVvNO6r02bIo3apCV5Z/2yyQbfrEv esGcc2vium2mSMPzMzrPVvR6v6P3qd74BzyxC1HZmufN/3TYYIwxwKrqaptSMsR/qt4W H1y5aRjQIyOPMIpLihFgfJfqTGoQv/trY4Ag8E/ysSng+hIRRhBOdC7LyTotoYchw8eY O9nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=bKM1PXgVHCo5t1AJQMHZ4IKcN2WdkoZ0c89bjGcZmpY=; b=xAHZCiJT272Cqy5oLG4JV/G7/he24YMuQcn3mf7rjmgPMOV2FmDJ6miasWr63s1pAT 7X8ZZZx3KKBV4IDKYLLK5xWihBBTYeF+S5tRwK3HpjqB483mj9KpMwlAPd0ijsv22DZp rYFn+ats8y2ApDZj8tyKZ4eVwpAyXN/IxrQEbbx/KfGYXS39q82e0luz4FsvZv5eJV0J JNhU8KZfOwyKVEjVMz3B8oJjxyyWQKERWNGqjvIbst4/YLTmiF9yQ9yu1wnhxaxsg8Rt Vi3EPJAeNk4zdvCZ3VIaLui5MGsj97jbbyhJ1Kbz4VA0wPGgf7mGHjo96Mzp3i2PyJG3 LXzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=Hww1ZYNn; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5si1736017pfb.330.2017.07.08.13.03.31; Sat, 08 Jul 2017 13:03:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.b=Hww1ZYNn; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753113AbdGHUDb (ORCPT + 6 others); Sat, 8 Jul 2017 16:03:31 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:34119 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753059AbdGHUDa (ORCPT ); Sat, 8 Jul 2017 16:03:30 -0400 Received: by mail-pf0-f172.google.com with SMTP id q85so31773905pfq.1 for ; Sat, 08 Jul 2017 13:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bKM1PXgVHCo5t1AJQMHZ4IKcN2WdkoZ0c89bjGcZmpY=; b=Hww1ZYNnkL8e2+0/A7u7wt/tV7GDL9MudRk8R3V5Wz9oFObsH+/MDr9Dwq6VvackDI 6IVIeRrw1m9/ovxTKftuJpg8SCCceHgz1l2PY8pXte7vqPeLRRHBPUAEFkU8DV55FYbc Zqx1K7Fx9UxSbfU+diAmABQOrP6HBkBY2+g7g= 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; bh=bKM1PXgVHCo5t1AJQMHZ4IKcN2WdkoZ0c89bjGcZmpY=; b=XDClrKpkFHu/iESAzVAGbXnHeURMsW98Zt3cMLMg/e4x+4jYQH+T8U5CRLffwQrV0e s5KECaLRgaKZuZyiBXZIBb/Dg+sKOAzIOqee+A9pmPG6Z5aDELjgVU0VdtWT23EAk9py ycQsyBR8yIcd76ppvploucQmTA8eP+yYLPyKahlOqrMqRNdbfUQDsWBpO1KRGRj+e0pL hmbizNFWJXazqepbOZYoBvXMJjO0BVPSAPWnp0plgrs6v7cKIN5Z2x8Rsbi2PRAkV0q1 fBAspc1cPRy1dRxDpUSjlvneZ2WboXO3O32AnUalynCQcfdjOGBszXFcAbzollGhR4Gy TlRA== X-Gm-Message-State: AIVw112xH+dZyC1ouep9r/uy4ZoLbMsAO8Yhcouqw4BhGuhrIg3loWMj OeVQCRx5UUXafGHdk6mQkg== X-Received: by 10.84.128.103 with SMTP id 94mr9824668pla.234.1499544210159; Sat, 08 Jul 2017 13:03:30 -0700 (PDT) Received: from localhost.localdomain ([106.51.234.165]) by smtp.gmail.com with ESMTPSA id m79sm1155703pfk.35.2017.07.08.13.03.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 08 Jul 2017 13:03:28 -0700 (PDT) From: Amit Pundir To: Greg KH , Eric Anholt Cc: Stable Subject: [PATCH for-4.4.y 1/5] drm/vc4: Fix NULL deref in HDMI init error path Date: Sun, 9 Jul 2017 01:33:17 +0530 Message-Id: <1499544201-12812-2-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499544201-12812-1-git-send-email-amit.pundir@linaro.org> References: <1499544201-12812-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Eric Anholt commit 5883980313af70aec0ceebaef6ef0709726e5e63 upstream. If you make it here other than through err_destroy_encoder, vc4->hdmi is still NULL. Signed-off-by: Eric Anholt Signed-off-by: Amit Pundir --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.13.0 diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index da9a36d6e1d1..467a650b5105 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -537,7 +537,7 @@ err_unprepare_hsm: err_unprepare_pix: clk_disable_unprepare(hdmi->pixel_clock); err_put_i2c: - put_device(&vc4->hdmi->ddc->dev); + put_device(&hdmi->ddc->dev); return ret; }