w1: gpio: remove unnecessary ENOMEM messages

Core already prints detailed reports on out of memory:

  WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230415104304.104134-16-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Krzysztof Kozlowski 2023-04-15 12:43:04 +02:00 committed by Greg Kroah-Hartman
parent 1e5d665215
commit 4ccb0fc2a2

View File

@ -101,10 +101,8 @@ static int w1_gpio_probe(struct platform_device *pdev)
master = devm_kzalloc(dev, sizeof(struct w1_bus_master),
GFP_KERNEL);
if (!master) {
dev_err(dev, "Out of memory\n");
if (!master)
return -ENOMEM;
}
pdata->gpiod = devm_gpiod_get_index(dev, NULL, 0, gflags);
if (IS_ERR(pdata->gpiod)) {