All of lore.kernel.org
 help / color / mirror / Atom feed
From: Soham Kute <officialsohamkute@gmail.com>
To: marvin24@gmx.de, gregkh@linuxfoundation.org
Cc: ac100@lists.launchpad.net, linux-tegra@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Soham Kute <officialsohamkute@gmail.com>
Subject: [PATCH] staging: nvec: kbd: use -EINVAL instead of -1
Date: Sun,  1 Mar 2026 01:50:08 +0530	[thread overview]
Message-ID: <20260228202008.40063-1-officialsohamkute@gmail.com> (raw)

Return proper error code -EINVAL instead of -1 when
the event type or code is not supported.

Signed-off-by: Soham Kute <officialsohamkute@gmail.com>
---
 drivers/staging/nvec/nvec_kbd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c
index d2b91318f151..5f742c8b32cc 100644
--- a/drivers/staging/nvec/nvec_kbd.c
+++ b/drivers/staging/nvec/nvec_kbd.c
@@ -92,10 +92,10 @@ static int nvec_kbd_event(struct input_dev *dev, unsigned int type,
 		return 0;
 
 	if (type != EV_LED)
-		return -1;
+		return -EINVAL;
 
 	if (code != LED_CAPSL)
-		return -1;
+		return -EINVAL;
 
 	buf[2] = !!value;
 	nvec_write_async(nvec, buf, sizeof(buf));
-- 
2.34.1


             reply	other threads:[~2026-02-28 20:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28 20:20 Soham Kute [this message]
2026-03-02  9:26 ` [PATCH] staging: nvec: kbd: use -EINVAL instead of -1 Dan Carpenter
2026-03-04  7:43   ` Soham Kute
2026-03-04  8:07     ` Dan Carpenter

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=20260228202008.40063-1-officialsohamkute@gmail.com \
    --to=officialsohamkute@gmail.com \
    --cc=ac100@lists.launchpad.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=marvin24@gmx.de \
    /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.