Commit 26bf5fc8 authored by Thorsten Blum's avatar Thorsten Blum Committed by Krzysztof Kozlowski

w1: Drop allocation error message

Drop the custom error message because kzalloc() already prints
allocation failures.
Signed-off-by: default avatarThorsten Blum <thorsten.blum@toblux.com>
Link: https://lore.kernel.org/r/20240527134946.338398-2-thorsten.blum@toblux.comSigned-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
parent 56813b24
......@@ -32,12 +32,8 @@ static struct w1_master *w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
* We are in process context(kernel thread), so can sleep.
*/
dev = kzalloc(sizeof(struct w1_master) + sizeof(struct w1_bus_master), GFP_KERNEL);
if (!dev) {
pr_err("Failed to allocate %zd bytes for new w1 device.\n",
sizeof(struct w1_master));
if (!dev)
return NULL;
}
dev->bus_master = (struct w1_bus_master *)(dev + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment