From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796171926; b=0IorzmmZGkgvTDEOK71hH5OS3TmARQuv/UpFPltWzSX+A9mjsP97lcWj7mOn728zSH+A 64kF8e/9uKMR5/0qXTXqip0MZzUjg54AR0QCh7cuo/crrYAkGfHoiSjJUxIo9wRJ2q3x3 UOWCFjivAwIo2+65/UcG3XukQnkqqd6iqlH4RcVuhgoxy4mocA+cvi7d49EhQs3BJ2Kgf R6+Svf/EhWFCl7c22vYwrredcD3vyEhTfmXPnwgBx9K9iCIuOUhb2OrWQWpPGKy0m6Brx YnF35FTv9xtY7MWKjtsxcoqXeQFSbF0IIUXpajhrZx3dSr5o3jwMPV5P5bgHz2FwX2Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796171926; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=y7YxwXacG7V0lYF+Z+/dygH64W3LBnamsnD1h2k0UlA=; b=L5/YaiAiCVNSjDMRKSNELGZjGKCutphPnB6Qwkfijgq1djBTqEhFRCt8JFB4T32yByHx wl36jdOAIXJXyZ/fuIeVCTf8sizYusQcVP2JKsjeeOy+kC5upTH1HGMfKoWc/96aZMW6E 3Y97iknF8EMBvESy4qH3grq4op6G4PZtM3d3JAbDARG9CDnq8VGMxKnXrDz+ara84pWpT A/02f4p9KWGQ2WMKajDon0bP+3Pb1XqtxclTbHZ3l2tqdJhn8dJT6BRY6WgrPlixEhXct TZ+diR5KOqm886v//jX07m62SrYc9CDOIQzZuOe49n7LjpuM5iahZynulE4d39J+Epg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="R2jK/9HJ"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B69A606A32A; Wed, 2 Dec 2026 00:38:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=R2jK/9HJ Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF7951F00893; Wed, 2 Dec 2026 00:38:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796171926; bh=y7YxwXacG7V0lYF+Z+/dygH64W3LBnamsnD1h2k0UlA=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=R2jK/9HJ9EuAdu3Sxoq2bRANln9UccA0B6/JcSVfVb/BtmL4Ez9+bEQOlD8rBOfpz qwhVmJhBp0/Qa3KXyVBUsZidkjK2Bpyn3IZUzlQDMBRQkAkq473KNduUCUzNWHWgLI ObeC3UvIKAZA8e7bpQu6rVHW2UsXWPuoI52lWUVUBT87Ze2K/Rth41nscOotWg2tW5 u5JZ1v3BF2d23vqahJY73B83N/lEQgJ9nYT+X0vH4kqhdGwo8SqTtgF5Qk/eoXJFQs +33kmnm5D5UlDLXO1282N517F51rNujqQlQ0/XgmAHvWFO6S+Rz5y77C+IT0vOHk+X 5RjbsYTFHPJyw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 2/7] Input: novatek-nvt-ts - split bus independent core out Reply-To: sashiko-reviews@lists.linux.dev To: "Qianhui Xu" Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org, dmitry.torokhov@gmail.com In-Reply-To: <20261202003159.1321846-2-xiaqinghuan@mail.ustc.edu.cn> References: <20261202003159.1321846-1-xiaqinghuan@mail.ustc.edu.cn> <20261202003159.1321846-2-xiaqinghuan@mail.ustc.edu.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 00:38:45 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] Input: missing dev_set_drvdata() in nvt_ts_probe() causes suspend NULL deref -- commit 6091ea62bfff4d047f5416c450fcaedba40ba1e3 Author: Qianhui Xu Input: novatek-nvt-ts - split bus independent core out This commit splits the Novatek NVT touchscreen driver into a bus-independent core and an I2C transport module. > diff --git a/drivers/input/touchscreen/novatek-nvt-ts.c b/drivers/input/t= ouchscreen/novatek-nvt-ts-core.c > similarity index 61% > rename from drivers/input/touchscreen/novatek-nvt-ts.c > rename to drivers/input/touchscreen/novatek-nvt-ts-core.c > index d1aa42533db2a..522b5e6131c9e 100644 > --- a/drivers/input/touchscreen/novatek-nvt-ts.c > +++ b/drivers/input/touchscreen/novatek-nvt-ts-core.c [ ... ] > @@ -192,7 +110,7 @@ static void nvt_ts_stop(struct input_dev *dev) > regulator_bulk_disable(ARRAY_SIZE(data->regulators), data->regulators); > } > =20 > -static int nvt_ts_suspend(struct device *dev) > +int nvt_ts_suspend(struct device *dev) > { > struct nvt_ts_data *data =3D dev_get_drvdata(dev); > =20 > @@ -204,7 +122,7 @@ static int nvt_ts_suspend(struct device *dev) > return 0; > } > =20 > -static int nvt_ts_resume(struct device *dev) > +int nvt_ts_resume(struct device *dev) > { > struct nvt_ts_data *data =3D dev_get_drvdata(dev); > =20 > @@ -216,17 +134,15 @@ static int nvt_ts_resume(struct device *dev) > return 0; > } > =20 > -static DEFINE_SIMPLE_DEV_PM_OPS(nvt_ts_pm_ops, nvt_ts_suspend, nvt_ts_re= sume); > - > -static int nvt_ts_probe(struct i2c_client *client) > +int nvt_ts_probe(struct device *dev, const struct nvt_ts_bus_ops *bus_op= s, > + int irq, unsigned int bustype, const char *name) > { > - struct device *dev =3D &client->dev; > int error, width, height, irq_type; > struct nvt_ts_data *data; > const struct nvt_ts_i2c_chip_data *chip; > struct input_dev *input; > =20 > - if (!client->irq) { > + if (!irq) { > dev_err(dev, "Error no irq specified\n"); > return -EINVAL; > } > @@ -235,14 +151,13 @@ static int nvt_ts_probe(struct i2c_client *client) > if (!data) > return -ENOMEM; > =20 > - chip =3D device_get_match_data(&client->dev); > + chip =3D device_get_match_data(dev); > if (!chip) > return -EINVAL; > =20 > data->dev =3D dev; > - data->bus_ops =3D &nvt_ts_i2c_bus_ops; > - data->irq =3D client->irq; > - i2c_set_clientdata(client, data); > + data->bus_ops =3D bus_ops; > + data->irq =3D irq; [Severity: High] Does removing i2c_set_clientdata(client, data) without calling dev_set_drvdata(dev, data) cause a NULL pointer dereference in nvt_ts_suspend() and nvt_ts_resume()? nvt_ts_suspend() and nvt_ts_resume() fetch data via dev_get_drvdata(dev) and immediately access &data->input->mutex, while input_set_drvdata(input, data) later in nvt_ts_probe() only sets driver data on the child input device. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202003159.1321= 846-1-xiaqinghuan@mail.ustc.edu.cn?part=3D2