LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] macintosh/windfarm: Return -ENOMEM on allocation failure
@ 2026-11-29 12:50 Thorsten Blum
  2026-11-29 12:50 ` [PATCH 1/3] macintosh/windfarm: Return -ENOMEM on AD7417 " Thorsten Blum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thorsten Blum @ 2026-11-29 12:50 UTC (permalink / raw)
  To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Ritesh Harjani, Shrikanth Hegde,
	Benjamin Herrenschmidt, Jean Delvare
  Cc: linuxppc-dev, Thorsten Blum

Several windfarm drivers return -ENODEV when kzalloc_obj() fails in
probe. Return -ENOMEM to correctly report the allocation failures.

Thorsten Blum (3):
  macintosh/windfarm: Return -ENOMEM on AD7417 allocation failure
  macintosh/windfarm: Return -ENOMEM on LM87 allocation failure
  macintosh/windfarm: Return -ENOMEM on LM75 allocation failure

 drivers/macintosh/windfarm_ad7417_sensor.c | 2 +-
 drivers/macintosh/windfarm_lm75_sensor.c   | 2 +-
 drivers/macintosh/windfarm_lm87_sensor.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] macintosh/windfarm: Return -ENOMEM on AD7417 allocation failure
  2026-11-29 12:50 [PATCH 0/3] macintosh/windfarm: Return -ENOMEM on allocation failure Thorsten Blum
@ 2026-11-29 12:50 ` Thorsten Blum
  2026-11-29 12:50 ` [PATCH 2/3] macintosh/windfarm: Return -ENOMEM on LM87 " Thorsten Blum
  2026-11-29 12:50 ` [PATCH 3/3] macintosh/windfarm: Return -ENOMEM on LM75 " Thorsten Blum
  2 siblings, 0 replies; 4+ messages in thread
From: Thorsten Blum @ 2026-11-29 12:50 UTC (permalink / raw)
  To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Ritesh Harjani, Shrikanth Hegde,
	Benjamin Herrenschmidt, Jean Delvare
  Cc: linuxppc-dev, Thorsten Blum

Return -ENOMEM instead of -ENODEV when kzalloc_obj() fails in
wf_ad7417_probe().

Fixes: 850dc32168a9 ("powerpc/windfarm: Add ad7417 sensor")
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 drivers/macintosh/windfarm_ad7417_sensor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/macintosh/windfarm_ad7417_sensor.c b/drivers/macintosh/windfarm_ad7417_sensor.c
index 4bae07ca6669..ed91e5bdee76 100644
--- a/drivers/macintosh/windfarm_ad7417_sensor.c
+++ b/drivers/macintosh/windfarm_ad7417_sensor.c
@@ -262,7 +262,7 @@ static int wf_ad7417_probe(struct i2c_client *client)
 
 	pv = kzalloc_obj(struct wf_ad7417_priv);
 	if (pv == NULL)
-		return -ENODEV;
+		return -ENOMEM;
 
 	kref_init(&pv->ref);
 	mutex_init(&pv->lock);


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] macintosh/windfarm: Return -ENOMEM on LM87 allocation failure
  2026-11-29 12:50 [PATCH 0/3] macintosh/windfarm: Return -ENOMEM on allocation failure Thorsten Blum
  2026-11-29 12:50 ` [PATCH 1/3] macintosh/windfarm: Return -ENOMEM on AD7417 " Thorsten Blum
@ 2026-11-29 12:50 ` Thorsten Blum
  2026-11-29 12:50 ` [PATCH 3/3] macintosh/windfarm: Return -ENOMEM on LM75 " Thorsten Blum
  2 siblings, 0 replies; 4+ messages in thread
From: Thorsten Blum @ 2026-11-29 12:50 UTC (permalink / raw)
  To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Ritesh Harjani, Shrikanth Hegde,
	Benjamin Herrenschmidt, Jean Delvare
  Cc: linuxppc-dev, Thorsten Blum

Return -ENOMEM instead of -ENODEV when kzalloc_obj() fails in
wf_lm87_probe().

Fixes: 08fe5bc75f8c ("powerpc/windfarm: Add lm87 sensor")
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 drivers/macintosh/windfarm_lm87_sensor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/macintosh/windfarm_lm87_sensor.c b/drivers/macintosh/windfarm_lm87_sensor.c
index a571035daff6..81dae7b4dbc3 100644
--- a/drivers/macintosh/windfarm_lm87_sensor.c
+++ b/drivers/macintosh/windfarm_lm87_sensor.c
@@ -130,7 +130,7 @@ static int wf_lm87_probe(struct i2c_client *client)
 
 	lm = kzalloc_obj(struct wf_lm87_sensor);
 	if (lm == NULL)
-		return -ENODEV;
+		return -ENOMEM;
 
 	lm->i2c = client;
 	lm->sens.name = name;


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] macintosh/windfarm: Return -ENOMEM on LM75 allocation failure
  2026-11-29 12:50 [PATCH 0/3] macintosh/windfarm: Return -ENOMEM on allocation failure Thorsten Blum
  2026-11-29 12:50 ` [PATCH 1/3] macintosh/windfarm: Return -ENOMEM on AD7417 " Thorsten Blum
  2026-11-29 12:50 ` [PATCH 2/3] macintosh/windfarm: Return -ENOMEM on LM87 " Thorsten Blum
@ 2026-11-29 12:50 ` Thorsten Blum
  2 siblings, 0 replies; 4+ messages in thread
From: Thorsten Blum @ 2026-11-29 12:50 UTC (permalink / raw)
  To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Ritesh Harjani, Shrikanth Hegde,
	Benjamin Herrenschmidt, Jean Delvare
  Cc: linuxppc-dev, Thorsten Blum

Return -ENOMEM instead of -ENODEV when kzalloc_obj() fails in
wf_lm75_probe().

Fixes: 351ca3e31197 ("windfarm: Convert to new-style i2c drivers")
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 drivers/macintosh/windfarm_lm75_sensor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c
index 128e9944429a..ad74182242d8 100644
--- a/drivers/macintosh/windfarm_lm75_sensor.c
+++ b/drivers/macintosh/windfarm_lm75_sensor.c
@@ -132,7 +132,7 @@ static int wf_lm75_probe(struct i2c_client *client)
 
 	lm = kzalloc_obj(struct wf_lm75_sensor);
 	if (lm == NULL)
-		return -ENODEV;
+		return -ENOMEM;
 
 	lm->inited = 0;
 	lm->ds1775 = ds1775;


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-29 12:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 12:50 [PATCH 0/3] macintosh/windfarm: Return -ENOMEM on allocation failure Thorsten Blum
2026-11-29 12:50 ` [PATCH 1/3] macintosh/windfarm: Return -ENOMEM on AD7417 " Thorsten Blum
2026-11-29 12:50 ` [PATCH 2/3] macintosh/windfarm: Return -ENOMEM on LM87 " Thorsten Blum
2026-11-29 12:50 ` [PATCH 3/3] macintosh/windfarm: Return -ENOMEM on LM75 " Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox