public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c:i2c-core-of:remove redundant dev_err message
@ 2020-02-26 10:39 tangbin
  2020-02-26 10:58 ` Francesco Lavra
  0 siblings, 1 reply; 3+ messages in thread
From: tangbin @ 2020-02-26 10:39 UTC (permalink / raw)
  To: wsa; +Cc: linux-i2c, linux-kernel, tangbin

of_i2c_register_device already contains error message, so remove
the redundant dev_err message

Signed-off-by: tangbin <tangbin@cmss.chinamobile.com>
---
 drivers/i2c/i2c-core-of.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
index 6787c1f71..7b0a786d3 100644
--- a/drivers/i2c/i2c-core-of.c
+++ b/drivers/i2c/i2c-core-of.c
@@ -103,9 +103,7 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
 
 		client = of_i2c_register_device(adap, node);
 		if (IS_ERR(client)) {
-			dev_err(&adap->dev,
-				 "Failed to create I2C device for %pOF\n",
-				 node);
+			return PTR_ERR(client);
 			of_node_clear_flag(node, OF_POPULATED);
 		}
 	}
@@ -246,8 +244,6 @@ static int of_i2c_notify(struct notifier_block *nb, unsigned long action,
 
 		client = of_i2c_register_device(adap, rd->dn);
 		if (IS_ERR(client)) {
-			dev_err(&adap->dev, "failed to create client for '%pOF'\n",
-				 rd->dn);
 			put_device(&adap->dev);
 			of_node_clear_flag(rd->dn, OF_POPULATED);
 			return notifier_from_errno(PTR_ERR(client));
-- 
2.20.1.windows.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-10 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-26 10:39 [PATCH] i2c:i2c-core-of:remove redundant dev_err message tangbin
2020-02-26 10:58 ` Francesco Lavra
2020-03-10 10:52   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox