From: Thorsten Blum <blum@kernel.org>
To: Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <chleroy@kernel.org>,
Ritesh Harjani <ritesh.list@gmail.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Jean Delvare <khali@linux-fr.org>
Cc: linuxppc-dev@lists.ozlabs.org, Thorsten Blum <blum@kernel.org>
Subject: [PATCH 2/3] macintosh/windfarm: Return -ENOMEM on LM87 allocation failure
Date: Sun, 29 Nov 2026 13:50:39 +0100 [thread overview]
Message-ID: <20261129125037.1173191-7-blum@kernel.org> (raw)
In-Reply-To: <20261129125037.1173191-5-blum@kernel.org>
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;
next prev parent reply other threads:[~2026-11-29 12:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-11-29 12:50 ` [PATCH 3/3] macintosh/windfarm: Return -ENOMEM on LM75 " Thorsten Blum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261129125037.1173191-7-blum@kernel.org \
--to=blum@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=chleroy@kernel.org \
--cc=khali@linux-fr.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sshegde@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.