linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: clean up wiimote_cmd_map_mp() return type
@ 2020-03-03 10:11 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-03-03 10:11 UTC (permalink / raw)
  To: David Herrmann
  Cc: Jiri Kosina, Benjamin Tissoires, linux-input, linux-kernel,
	kernel-janitors

No one checks the error code, but the static checkers complain:

    drivers/hid/hid-wiimote-core.c:506 wiimote_cmd_map_mp()
    warn: signedness bug returning '(-512)'

We're returning negative error codes or zero on success so the type
should be int.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/hid/hid-wiimote-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c
index 92874dbe4d4a..eaa2fa565047 100644
--- a/drivers/hid/hid-wiimote-core.c
+++ b/drivers/hid/hid-wiimote-core.c
@@ -484,7 +484,7 @@ static int wiimote_cmd_init_mp(struct wiimote_data *wdata)
 }
 
 /* requires the cmd-mutex to be held */
-static bool wiimote_cmd_map_mp(struct wiimote_data *wdata, __u8 exttype)
+static int wiimote_cmd_map_mp(struct wiimote_data *wdata, __u8 exttype)
 {
 	__u8 wmem;
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-03 10:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03 10:11 [PATCH] HID: clean up wiimote_cmd_map_mp() return type Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).