提交 d1fdeb31 编写于 作者: T Tang Bin 提交者: Wolfram Sang

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: NShengju Zhang <zhangshengju@cmss.chinamobile.com>
Signed-off-by: NTang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: NWolfram Sang <wsa@kernel.org>
上级 79f7ab3a
...@@ -312,9 +312,6 @@ static int efm32_i2c_probe(struct platform_device *pdev) ...@@ -312,9 +312,6 @@ static int efm32_i2c_probe(struct platform_device *pdev)
int ret; int ret;
u32 clkdiv; u32 clkdiv;
if (!np)
return -EINVAL;
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
if (!ddata) if (!ddata)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册