Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1860736rwb; Fri, 19 Aug 2022 10:35:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR6gXis29Lfv1a27rbVc/3zk5sr2KKqjEYgx5wE/iG6KraMlpvfVkj3eifiZVu7/Ni8tqEUy X-Received: by 2002:a63:8848:0:b0:42a:1a29:c261 with SMTP id l69-20020a638848000000b0042a1a29c261mr5822021pgd.51.1660930532366; Fri, 19 Aug 2022 10:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930532; cv=none; d=google.com; s=arc-20160816; b=Q4IwJ3pBMdCXXtJEG8DThWHPLH2NHXyHlmGmKF27N7te+jiZenftoM76Ez26YVvYWg m6jl1JDxGK8gKUSA6gbfbzgPcYOHt9ooXFM3OhexfYn75mjd4xg3wLssEbI/gJOFDKDq AT65zGfV2TJ6JOmJSM3cq2n0blS6QaGKpbsoXBd+facFyimZkV4WjAUEQy7eu2YCtHMo Xu/sD0UXLsknSlrTqRG0ORdKy01uMhEAnYsKuVDAfeIYZQkq7pl//PeVGVvfIL5GFjVt uYwzd3GGGSZo2WrhjH+wo1IrMPjapgFp1dcqhkg3ETW8wEey/ehcrbIXqKX5EowR4iDd R92Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=bhqPXq4gNx0rzXmITN2/6bnc05D32mOwa4OfGksMt/k=; b=O7bfj9xka23y3MGdAMCOFIEQVut7CWcPrTN8kzSbDoV5cjy3AEP9oQKEEPRbBnlv8l 6OFMlxkh/YFzL5e0S8ch/e+8zX+gGnhOj67U2OcYYtQUSwJEfa2rlMUjwl1X5ugozUqO DHvjs2yfSd+/z7ywnAHjXjQMvA+SRK344sT3G1Q1uwJJj4aG2vgGlsBlM6t2Feepfljz TMcQwOWHcmFrjk8Nuk2XuqfWZbJmorzKkYYg+VZWAKYrQ3JptpQVQM8urFFrP8VnOGH4 3eUedi5po12AWjd9kpp5iSZTUcz7GOybf2IFHTmNE7gj5rt/sZ/Mhk+Q70ZkvJLkedn4 hESg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YPyLcdiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c14-20020a056a000ace00b005281e5606b2si118614pfl.32.2022.08.19.10.35.21; Fri, 19 Aug 2022 10:35:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YPyLcdiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349823AbiHSPhj (ORCPT + 99 others); Fri, 19 Aug 2022 11:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349817AbiHSPhg (ORCPT ); Fri, 19 Aug 2022 11:37:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B15ACE831F; Fri, 19 Aug 2022 08:37:35 -0700 (PDT) Received: from nicolas-tpx395.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nicolas) by madras.collabora.co.uk (Postfix) with ESMTPSA id CEFC36601DC1; Fri, 19 Aug 2022 16:37:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1660923453; bh=yPtWZ9dIeoSnNCWNTE1Z+qUHDWr0Ag6n3/7+J9VVv8s=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=YPyLcdiuSpMv6Qmg1v2M1IdOBzsVHjTCwxcqM/eVA5UQqG0DxkbKaMW4tTqCfl4Xt GpmOwmCRrvzvkpqsZ9iFJo9+h/QofDgaI3+Qzd/7lT/EEVf/wBKaiuLstvdh2kPyeT tmrybLzL/faEvfdmudArNQhS2hKEFxnKDVZs/BNIiSe+7TG1riqXhff15tUd1wfYxq VT7nllVpMuW3ENKXdWS393D/qsgSoyQtHbzQcgSRWE2McS0CuurppiLmDHmC91455Z WLl9a2zBjsqubtRWacvH2nAxEQvsFPetiivf5nTO/3Ikm7rNb9P37HKaPaTtQhhi+M FQJbeXK/gDvgA== Message-ID: <47ce07adc73887b5afaf9815a78b793d0e9a6b54.camel@collabora.com> Subject: Re: [PATCH v1 2/3] media: cedrus: Set the platform driver data earlier From: Nicolas Dufresne To: Jernej =?UTF-8?Q?=C5=A0krabec?= , linux-media@vger.kernel.org, Maxime Ripard , Paul Kocialkowski , Mauro Carvalho Chehab , Greg Kroah-Hartman , Chen-Yu Tsai , Samuel Holland Cc: kernel@collabora.com, Dmitry Osipenko , stable@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Date: Fri, 19 Aug 2022 11:37:20 -0400 In-Reply-To: <4418189.LvFx2qVVIh@jernej-laptop> References: <20220818203308.439043-1-nicolas.dufresne@collabora.com> <20220818203308.439043-3-nicolas.dufresne@collabora.com> <4418189.LvFx2qVVIh@jernej-laptop> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le vendredi 19 ao=C3=BBt 2022 =C3=A0 06:17 +0200, Jernej =C5=A0krabec a =C3= =A9crit=C2=A0: > Dne =C4=8Detrtek, 18. avgust 2022 ob 22:33:07 CEST je Nicolas Dufresne na= pisal(a): > > From: Dmitry Osipenko > >=20 > > The cedrus_hw_resume() crashes with NULL deference on driver probe if > > runtime PM is disabled because it uses platform data that hasn't been > > set up yet. Fix this by setting the platform data earlier during probe. >=20 > Does it even work without PM? Maybe it would be better if Cedrus would se= lect=20 > PM in Kconfig. I cannot comment myself on this, but it does not seem to invalidate this Dmitry's fix. >=20 > Best regards, > Jernej >=20 > >=20 > > Cc: stable@vger.kernel.org > > Signed-off-by: Dmitry Osipenko > > Signed-off-by: Nicolas Dufresne > > --- > > drivers/staging/media/sunxi/cedrus/cedrus.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > >=20 > > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c > > b/drivers/staging/media/sunxi/cedrus/cedrus.c index > > 960a0130cd620..55c54dfdc585c 100644 > > --- a/drivers/staging/media/sunxi/cedrus/cedrus.c > > +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c > > @@ -448,6 +448,8 @@ static int cedrus_probe(struct platform_device *pde= v) > > if (!dev) > > return -ENOMEM; > >=20 > > + platform_set_drvdata(pdev, dev); > > + > > dev->vfd =3D cedrus_video_device; > > dev->dev =3D &pdev->dev; > > dev->pdev =3D pdev; > > @@ -521,8 +523,6 @@ static int cedrus_probe(struct platform_device *pde= v) > > goto err_m2m_mc; > > } > >=20 > > - platform_set_drvdata(pdev, dev); > > - > > return 0; > >=20 > > err_m2m_mc: >=20 >=20 >=20 >=20