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 1/3] macintosh/windfarm: Return -ENOMEM on AD7417 allocation failure
Date: Sun, 29 Nov 2026 13:50:38 +0100 [thread overview]
Message-ID: <20261129125037.1173191-6-blum@kernel.org> (raw)
In-Reply-To: <20261129125037.1173191-5-blum@kernel.org>
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);
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 ` Thorsten Blum [this message]
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
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-6-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.