Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp706519ybz; Wed, 15 Apr 2020 17:09:10 -0700 (PDT) X-Google-Smtp-Source: APiQypIunREn/eB470ZOdL5CBCu7kb7wonX55X/g8mKVi0XMMZ50N0pz6K7d5dML4g5xPfbDh84t X-Received: by 2002:a50:9dc4:: with SMTP id l4mr27886972edk.234.1586995750439; Wed, 15 Apr 2020 17:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586995750; cv=none; d=google.com; s=arc-20160816; b=oYo7QkQiMaUToPxbKCt6B5d7Mm4BPaK3GtDZann4sWWT+tWqMJh2MEWnZiXnBRUb8h IcGW/gRn4JgLcyx2osQhDE9/TrkxoKxXgTXF+O+MVpY740gBoMirwUZrJsVKTYh36d5a 7v+Nl8jAr4E6bbNO0Ldjgx/lzcEY1rbklfOB2a0sGuk3VWyKh/vTUyxm90gg5nLobCwf /sjGBiIupagAGgj81yMHNqPqfq8LLsQq0p86pNz2aKk5ZRMadr5NpBXpODE7KhsesONJ bW50n5VggLCEVxqmPYIBiUEDXDC7/pXXGWJ9UeB4/Wa0XemE7coOsOzr1Sbekx31LlDf xH+A== 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=o+VKrkNOB8hWNqAbv5V2f0M8w8Dt/Uj0r44X8wgQetc=; b=D5QNaPQa7aMH61c8A5N3tyCZhHPnrlZNVLkzMzLEJDhk4GiWEzvllDc2raVww2Vjcs /J+19gRFp3Uupy4ZqSmkjL4MXNwz++N/+Y479ihY+4Cj8r5RayicwXnHr6IWwMUoBtfn sGZI8gV6tmPMW9Hmay1Yiz7czTuVfjTUwxzFE8t1jOPZ+XlKPCTgP3E9TPT7HKdkmDGV +WjaSYj8F+0/a1wCAQy3jTZc2jFXwa+v/O0wguCo/qlN+vKZqyNzc4CSpK8EMPHMDzTP BQL63K3ckd+p50HQx7bOISPvnZDujxkhj6/ENdKYs1WsJz7f+SckD6Of/YSBXLn9tWX9 Rydw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si1925819edq.225.2020.04.15.17.08.45; Wed, 15 Apr 2020 17:09:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2634028AbgDOOFg (ORCPT + 99 others); Wed, 15 Apr 2020 10:05:36 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:47046 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2633951AbgDOOF3 (ORCPT ); Wed, 15 Apr 2020 10:05:29 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.13]) by rmmx-syy-dmz-app06-12006 (RichMail) with SMTP id 2ee65e97148777f-6d7eb; Wed, 15 Apr 2020 22:04:56 +0800 (CST) X-RM-TRANSID: 2ee65e97148777f-6d7eb X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.3.208.246]) by rmsmtp-syy-appsvr07-12007 (RichMail) with SMTP id 2ee75e97148659f-b8795; Wed, 15 Apr 2020 22:04:56 +0800 (CST) X-RM-TRANSID: 2ee75e97148659f-b8795 From: Tang Bin To: wsa@the-dreams.de, o.rempel@pengutronix.de, u.kleine-koenig@pengutronix.de, ardb@kernel.org Cc: linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tang Bin , Shengju Zhang Subject: [PATCH] i2c: drivers: Avoid unnecessary check in efm32_i2c_probe() Date: Wed, 15 Apr 2020 22:06:40 +0800 Message-Id: <20200415140640.19948-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 The function efm32_i2c_probe() is only called with an openfirmware platform device.Therefore there is no need to check that it has an openfirmware node. Signed-off-by: Tang Bin Signed-off-by: Shengju Zhang --- drivers/i2c/busses/i2c-efm32.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c index 4de31fae7..4786ef6b2 100644 --- a/drivers/i2c/busses/i2c-efm32.c +++ b/drivers/i2c/busses/i2c-efm32.c @@ -312,9 +312,6 @@ static int efm32_i2c_probe(struct platform_device *pdev) int ret; u32 clkdiv; - if (!np) - return -EINVAL; - ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); if (!ddata) return -ENOMEM; -- 2.20.1.windows.1