From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Vadim Pasternak <vadimp@nvidia.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
michaelsh@nvidia.com, dan.carpenter@linaro.org,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH platform-next 1/1] platform/mellanox: mlxreg-dpu: Fix smatch warnings
Date: Mon, 5 May 2025 14:42:25 +0300 (EEST) [thread overview]
Message-ID: <a24badb9-6893-c52b-7ec7-8e726836c3fa@linux.intel.com> (raw)
In-Reply-To: <20250504165404.6877-1-vadimp@nvidia.com>
On Sun, 4 May 2025, Vadim Pasternak wrote:
> Add missed call to release adapter.
> Remove wrong error pointer conversion.
>
> Fixes: 3e75f2954116 ("platform/mellanox: mlxreg-dpu: Add initial support for Nvidia DPU")
> Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
> ---
> drivers/platform/mellanox/mlxreg-dpu.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/mellanox/mlxreg-dpu.c b/drivers/platform/mellanox/mlxreg-dpu.c
> index 277e4b8cc5cb..805b9bfbc85f 100644
> --- a/drivers/platform/mellanox/mlxreg-dpu.c
> +++ b/drivers/platform/mellanox/mlxreg-dpu.c
> @@ -535,8 +535,10 @@ static int mlxreg_dpu_probe(struct platform_device *pdev)
> return -EPROBE_DEFER;
>
> mlxreg_dpu = devm_kzalloc(&pdev->dev, sizeof(*mlxreg_dpu), GFP_KERNEL);
> - if (!mlxreg_dpu)
> + if (!mlxreg_dpu) {
> + i2c_put_adapter(data->hpdev.adapter);
> return -ENOMEM;
> + }
Why this doesn't reuse the existing rollbacks??
>
> /* Create device at the top of DPU I2C tree. */
> data->hpdev.client = i2c_new_client_device(data->hpdev.adapter,
> @@ -562,7 +564,6 @@ static int mlxreg_dpu_probe(struct platform_device *pdev)
> if (err) {
> dev_err(&pdev->dev, "Failed to sync regmap for client %s at bus %d at addr 0x%02x\n",
> data->hpdev.brdinfo->type, data->hpdev.nr, data->hpdev.brdinfo->addr);
> - err = PTR_ERR(regmap);
> goto regcache_sync_fail;
> }
>
>
--
i.
prev parent reply other threads:[~2025-05-05 11:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-04 16:54 [PATCH platform-next 1/1] platform/mellanox: mlxreg-dpu: Fix smatch warnings Vadim Pasternak
2025-05-05 11:42 ` Ilpo Järvinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a24badb9-6893-c52b-7ec7-8e726836c3fa@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=dan.carpenter@linaro.org \
--cc=hdegoede@redhat.com \
--cc=michaelsh@nvidia.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=vadimp@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox