Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4767031ybv; Wed, 26 Feb 2020 02:48:18 -0800 (PST) X-Google-Smtp-Source: APXvYqwGIZKkitkxMT9nCqoRfyo1ASpUyUZJEFMY8xrWrYHH9Y17VdJDfwYLU661ersix86S09wG X-Received: by 2002:a9d:6289:: with SMTP id x9mr2516942otk.8.1582714097923; Wed, 26 Feb 2020 02:48:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582714097; cv=none; d=google.com; s=arc-20160816; b=X6T75rGegEBJCGE1Kh5JbTW8GeNq700G9kN277bWrqBxOxOB1baL9lb3j5nufZWJKP M5FJn3rCI16baPiMK427RTyOBy7TB5G5EhbXyKyjk6yL2EoihOsdgcuxIxdfIcpy7tTM WvfuSldDTVgNscCouzvBpBN8lPEQZ3N7Ny1Uz98Z1WFGCVLTKPpscORFtSR+SB5JP/Hp OMLjRnFYQL6Izs5GBoK6VaISUw4yR32/HM+/26kt2yOyXbrZy942QdO+ArByF+Yfbtjg 8p7TYWC2vXbnmJe0AEo+ON8bMD+tp+8FXl27prhdsNtlVCre50MrmBaJT91aYheQhpG+ rfuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=AgYLxCSbiNqSk6/6T/3WXxsG+2qftHNdYesPNce714o=; b=eE+3vm/RIkQeO1Z51pjusI+cw02HtkI0ooOT6pfv3jgG/VliIaZDwgDc+6FvXDUTv8 RSgwbuF4VhyYaczxorWVnucsYm3hdfq7GEcCF2S68u4orTt8tSGNOGLY1Gsm0dLjpiGi tnOzk0gHTHCOtMnL2xpZnbjpJgPfohgNN8x5n4yFZAfpAnb8ckla3ePkg9q/HrHwbA3o LdEFeZoxohBk/qDG6oONZyvcJw+Xkpuy7jO2tLOAmL23nKoldc7U30zj92YTZNGazaaT mACX/grAWgOmw+1xWU+gvYNezbAzrti8PKsYyTqlDr6H6cZYXZSDoQ1rNjT4R39CPL6h HxYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w135si919810oiw.44.2020.02.26.02.47.52; Wed, 26 Feb 2020 02:48:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727948AbgBZKrq (ORCPT + 99 others); Wed, 26 Feb 2020 05:47:46 -0500 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:6600 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726679AbgBZKrq (ORCPT ); Wed, 26 Feb 2020 05:47:46 -0500 X-Greylist: delayed 543 seconds by postgrey-1.27 at vger.kernel.org; Wed, 26 Feb 2020 05:47:44 EST Received: from spf.mail.chinamobile.com (unknown[172.16.121.13]) by rmmx-syy-dmz-app08-12008 (RichMail) with SMTP id 2ee85e564a9b2e7-50c0b; Wed, 26 Feb 2020 18:38:20 +0800 (CST) X-RM-TRANSID: 2ee85e564a9b2e7-50c0b X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.3.208.163]) by rmsmtp-syy-appsvr07-12007 (RichMail) with SMTP id 2ee75e564a99c06-d63c9; Wed, 26 Feb 2020 18:38:19 +0800 (CST) X-RM-TRANSID: 2ee75e564a99c06-d63c9 From: tangbin To: wsa@the-dreams.de Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, tangbin Subject: [PATCH] i2c:i2c-core-of:remove redundant dev_err message Date: Wed, 26 Feb 2020 18:39:01 +0800 Message-Id: <20200226103901.21520-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org of_i2c_register_device already contains error message, so remove the redundant dev_err message Signed-off-by: tangbin --- 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