HSI: nokia-modem: Delete error messages for a failed memory allocation in two functions
The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
This commit is contained in:
Родитель
1be0593f05
Коммит
4e3b9baa2f
|
@ -104,10 +104,8 @@ static int nokia_modem_gpio_probe(struct device *dev)
|
||||||
|
|
||||||
modem->gpios = devm_kcalloc(dev, gpio_count, sizeof(*modem->gpios),
|
modem->gpios = devm_kcalloc(dev, gpio_count, sizeof(*modem->gpios),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!modem->gpios) {
|
if (!modem->gpios)
|
||||||
dev_err(dev, "Could not allocate memory for gpios\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
modem->gpio_amount = gpio_count;
|
modem->gpio_amount = gpio_count;
|
||||||
|
|
||||||
|
@ -156,10 +154,9 @@ static int nokia_modem_probe(struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
modem = devm_kzalloc(dev, sizeof(*modem), GFP_KERNEL);
|
modem = devm_kzalloc(dev, sizeof(*modem), GFP_KERNEL);
|
||||||
if (!modem) {
|
if (!modem)
|
||||||
dev_err(dev, "Could not allocate memory for nokia_modem_device\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
dev_set_drvdata(dev, modem);
|
dev_set_drvdata(dev, modem);
|
||||||
modem->device = dev;
|
modem->device = dev;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче