summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorTang Bin <tangbin@cmss.chinamobile.com>2020-04-15 22:06:40 +0800
committerWolfram Sang <wsa@kernel.org>2020-05-22 17:08:19 +0200
commitd1fdeb314e82fb782ab918ea6bfe41b429343725 (patch)
tree08dfbbf4359143bbf29fb1df6ce567874a60b2be /drivers/i2c
parent79f7ab3a64fd92b86ebc992b333815400942a3b7 (diff)
i2c: efm32: Avoid unnecessary check in efm32_i2c_probe()
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: Shengju Zhang <zhangshengju@cmss.chinamobile.com> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-efm32.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c
index 9d28de0e8723..838ce0947191 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;