[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a5cbd3d4-b8ba-4e1f-8ae1-b0e79fedfd47@kernel.org>
Date: Sun, 17 Aug 2025 07:52:12 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Ciprian Costea <dan.carpenter@...aro.org>,
Srinivas Kandagatla <srini@...nel.org>
Cc: linaro-s32@...aro.org, NXP S32 Linux Team <s32@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP
On 16/08/2025 12:47, Ciprian Costea wrote:
> Provide access to the On Chip One-Time Programmable Controller (OCOTP)
> pages on the NXP S32G platform.
>
> Signed-off-by: Ciprian Costea <ciprianmarian.costea@....com>
> Co-developed-by: Ghennadi Procopciuc <ghennadi.procopciuc@....com>
> Co-developed-by: Larisa Grigore <larisa.grigore@....com>
Incomplete chain, missing SoBs. You cannot add someone's Co-developed-by
if they do not sign the patch.
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> drivers/nvmem/Kconfig | 10 ++
> drivers/nvmem/Makefile | 2 +
> drivers/nvmem/s32g-ocotp-nvmem.c | 171 +++++++++++++++++++++++++++++++
> 3 files changed, 183 insertions(+)
> create mode 100644 drivers/nvmem/s32g-ocotp-nvmem.c
>
> diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
> +
> +static int s32g_ocotp_probe(struct platform_device *pdev)
> +{
> + const struct of_device_id *of_matched_dt_id;
> + struct s32g_ocotp_priv *s32g_data;
> + struct device *dev = &pdev->dev;
> + struct nvmem_device *nvmem;
> + struct resource *res;
> +
> + of_matched_dt_id = of_match_device(ocotp_of_match, dev);
> + if (!of_matched_dt_id) {
This is useless check, drop everything around of_matched_dt_id.
> + dev_err(dev, "Unable to find driver data.\n");
> + return -ENODEV;
> + }
> +
> + s32g_data = devm_kzalloc(dev, sizeof(*s32g_data), GFP_KERNEL);
> + if (!s32g_data)
> + return -ENOMEM;
> +
> + s32g_data->fuse = of_device_get_match_data(dev);
> + if (!s32g_data->fuse) {
> + dev_err(dev, "Cannot find platform device data.\n");
This is impossible condition, so no need for error message.
> + return -ENODEV;
And here probably -EINVAL, because if it was probed, the device is there.
> + }
Best regards,
Krzysztof
Powered by blists - more mailing lists