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>
This commit is contained in:
Tang Bin 2020-04-15 22:06:40 +08:00 коммит произвёл Wolfram Sang
Родитель 79f7ab3a64
Коммит d1fdeb314e
1 изменённых файлов: 0 добавлений и 3 удалений

Просмотреть файл

@ -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;