From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A33DC2D0A3 for ; Sun, 1 Nov 2020 15:14:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 D26332223F for ; Sun, 1 Nov 2020 15:14:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cQgInWzu"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ec+X8YBt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D26332223F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=E3YjUjDMfBliGY2vqIJJDSFQCmHXJXody4tHOqq1T/M=; b=cQgInWzuxCH3LU2xWJ+gS7kPT Il6zNZDkMb98+vs4KDPGxd15y7WPnRzsPVYjRSHNQc+I6uVbVdZTiiI4b5WeGqWb5LqSyf3mK9Bvl j2aHQ5mgvBkzd6UxMhK1fh0FsYyrlDQ+cjmUGd8ChZYns37igtOsa8UWq7SP+ZMSy24ziIPkLvkGT uw2B+vJZPNPfrEfLk1EiEtUHYajDU1mOQomcsyyKE55ZUkysR7tHpEbTZAhHKlGWTWcNsQotbT4Oi /W3ZarFsb+/GXsSbUsuP+rTdLVGOHfhAT3SGoiEMel2IfYWtD+KzgqxsPtQJEGhd5ULHL0G2K4VJJ MkWr/RUlA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZF30-000241-68; Sun, 01 Nov 2020 15:13:34 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZF2s-000228-AM; Sun, 01 Nov 2020 15:13:31 +0000 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (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 A1EBE2223F; Sun, 1 Nov 2020 15:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604243604; bh=1WOrV1jjtHcG7addgh8YJpo8rrwOUU24MJKpjdERXRE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ec+X8YBt7oP1F3vLOxylHK9Ei/R7rhJqbRKWffexjKA4K0qzs03KxfUKe4UVaRlef mSgIzJDEYz/zpcLh7fDzUl21l8n2OlHH00lNG1VGW/ynJeXu6hIdF18OHEA3AISzv4 1fcdhrX8RXoLyROvANs1aksll0pv4qc89vhlFImY= Date: Sun, 1 Nov 2020 15:13:18 +0000 From: Jonathan Cameron To: Fabien Parent Subject: Re: [PATCH v3] iio: adc: mediatek: fix unset field Message-ID: <20201101151318.052a9d19@archlinux> In-Reply-To: <20201018194644.3366846-1-fparent@baylibre.com> References: <20201018194644.3366846-1-fparent@baylibre.com> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201101_101326_429012_574B3647 X-CRM114-Status: GOOD ( 19.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lars@metafoo.de, linux-iio@vger.kernel.org, chun-hung.wu@mediatek.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, pmeerw@pmeerw.net, matthias.bgg@gmail.com, alexandru.ardelean@analog.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, 18 Oct 2020 21:46:44 +0200 Fabien Parent wrote: > dev_comp field is used in a couple of places but it is never set. This > results in kernel oops when dereferencing a NULL pointer. Set the > `dev_comp` field correctly in the probe function. > > Fixes: 6d97024dce23 ("iio: adc: mediatek: mt6577-auxadc, add mt6765 support") > Signed-off-by: Fabien Parent > Reviewed-by: Matthias Brugger Applied to the fixes-togreg branch of iio.git and marked for stable. Thanks, Jonathan > --- > > Changelog: > V2: > * s/of_device_get_match_data/device_get_match_data > * include mod_devicetable.h and property.h instead of of_*.h headers > V3: > * Remove extra space between Fixes tag and Signed-off-by tag > * Add missing Reviewed-by tag from Matthias Brugger > > drivers/iio/adc/mt6577_auxadc.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > index ac415cb089cd..79c1dd68b909 100644 > --- a/drivers/iio/adc/mt6577_auxadc.c > +++ b/drivers/iio/adc/mt6577_auxadc.c > @@ -9,9 +9,9 @@ > #include > #include > #include > -#include > -#include > +#include > #include > +#include > #include > #include > #include > @@ -276,6 +276,8 @@ static int mt6577_auxadc_probe(struct platform_device *pdev) > goto err_disable_clk; > } > > + adc_dev->dev_comp = device_get_match_data(&pdev->dev); > + > mutex_init(&adc_dev->lock); > > mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel