[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240527134946.338398-2-thorsten.blum@toblux.com>
Date: Mon, 27 May 2024 15:49:47 +0200
From: Thorsten Blum <thorsten.blum@...lux.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Thorsten Blum <thorsten.blum@...lux.com>
Subject: [PATCH v2] w1: Drop allocation error message
Drop the custom error message because kzalloc() already prints
allocation failures.
Signed-off-by: Thorsten Blum <thorsten.blum@...lux.com>
---
Changes in v2:
- Drop the error message instead of fixing it as suggested by Krzysztof
Kozlowski
- Link to v1: https://lore.kernel.org/linux-kernel/20240513154354.185974-3-thorsten.blum@toblux.com/
---
drivers/w1/w1_int.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index 3a71c5eb2f83..19a0ea28e9f3 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -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);
--
2.45.1
Powered by blists - more mailing lists