mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Richard <thomas.richard@bootlin.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: Lee Jones <lee@kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Werner Gartner <Werner.Gartner@congatec.com>,
	mfd@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH v6 10/10] i2c: cgbc: Register known I2C devices on the bus
Date: Thu, 26 Nov 2026 18:53:09 +0100	[thread overview]
Message-ID: <2f73988d-95b2-40ed-bcd9-c93640d1b296@bootlin.com> (raw)
In-Reply-To: <awhwiHGeUFnTvxzg@zenone.zhora.eu>

On 11/26/26 6:47 PM, Andi Shyti wrote:
> Hi Thomas,
> 
> ...
> 
>> @@ -385,7 +385,15 @@ static int cgbc_i2c_probe(struct platform_device *pdev)
>>  	if (ret)
>>  		return dev_err_probe(i2c->dev, ret, "Failed to get I2C bus frequency");
>>  
>> -	return i2c_add_numbered_adapter(&i2c->adap);
>> +	ret = i2c_add_numbered_adapter(&i2c->adap);
>> +	if (ret)
>> +		return ret;
>> +
>> +	/* Add known devices to the bus */
>> +	for (i = 0; i < pdata->nb_devices; i++)
>> +		i2c_new_client_device(&i2c->adap, pdata->devices + i);
> 
> Please handle return values here.
> 
Should the adapter probe return an error if we fail to add a new device
to the bus?

Best Regards,
Thomas

  reply	other threads:[~2026-11-26 17:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  9:47 [PATCH v6 00/10] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
2026-11-17  9:47 ` [PATCH v6 01/10] mfd: cgbc: Fix use of negative error code as valid session handle Thomas Richard (congatec GmbH)
2026-11-17  9:47 ` [PATCH v6 02/10] i2c: cgbc: Propagate hardware errors when polling read status Thomas Richard (congatec GmbH)
2026-11-26 13:34   ` Andi Shyti
2026-11-17  9:47 ` [PATCH v6 03/10] i2c: cgbc: Use real I2C bus names Thomas Richard (congatec GmbH)
2026-11-26 12:54   ` Andi Shyti
2026-11-26 13:41   ` Andi Shyti
2026-11-26 14:21     ` Thomas Richard
2026-11-17  9:47 ` [PATCH v6 04/10] mfd: cgbc: Add I2C platform data Thomas Richard (congatec GmbH)
2026-11-17  9:47 ` [PATCH v6 05/10] i2c: cgbc: Use plateform data to get bus ID and adapter name Thomas Richard (congatec GmbH)
2026-11-17  9:47 ` [PATCH v6 06/10] mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration Thomas Richard (congatec GmbH)
2026-11-17  9:47 ` [PATCH v6 07/10] i2c: cgbc: Add support for fixed frequency buses Thomas Richard (congatec GmbH)
2026-11-26 17:39   ` Andi Shyti
2026-11-17  9:47 ` [PATCH v6 08/10] mfd: cgbc: Add virtual I2C bus support Thomas Richard (congatec GmbH)
2026-11-17  9:47 ` [PATCH v6 09/10] mfd: cgbc: Add virtual storage devices on the virtual I2C bus Thomas Richard (congatec GmbH)
2026-11-17  9:47 ` [PATCH v6 10/10] i2c: cgbc: Register known I2C devices on the bus Thomas Richard (congatec GmbH)
2026-11-26 17:47   ` Andi Shyti
2026-11-26 17:53     ` Thomas Richard [this message]
2026-11-19 19:03 ` [PATCH v6 00/10] Congatec Board Controller: Add storage devices support Lee Jones
2026-11-19 19:11   ` Thomas Richard
2026-11-26 10:24   ` Thomas Richard

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=2f73988d-95b2-40ed-bcd9-c93640d1b296@bootlin.com \
    --to=thomas.richard@bootlin.com \
    --cc=Werner.Gartner@congatec.com \
    --cc=andi.shyti@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=thomas.petazzoni@bootlin.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

all inboxes | Powered by JetHome®