[PATCH] HID: thrustmaster: Initialized pointer twi with NULL rather than 0

Subsystems: hid core layer, the rest

STALE1843d

2 messages, 1 author, 2021-09-25 · open the first message on its own page

[PATCH] HID: thrustmaster: Initialized pointer twi with NULL rather than 0

From: Colin King <hidden>
Date: 2021-09-25 22:22:20

From: Colin Ian King <redacted>

Pointers should be initialized with NULL rather than 0. Fix this.

Signed-off-by: Colin Ian King <redacted>
---
 drivers/hid/hid-thrustmaster.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c
index d44550aa8805..aa874f075bf9 100644
--- a/drivers/hid/hid-thrustmaster.c
+++ b/drivers/hid/hid-thrustmaster.c
@@ -205,7 +205,7 @@ static void thrustmaster_model_handler(struct urb *urb)
 	struct tm_wheel *tm_wheel = hid_get_drvdata(hdev);
 	uint16_t model = 0;
 	int i, ret;
-	const struct tm_wheel_info *twi = 0;
+	const struct tm_wheel_info *twi = NULL;
 
 	if (urb->status) {
 		hid_err(hdev, "URB to get model id failed with error %d\n", urb->status);
-- 
2.32.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

NAK: [PATCH] HID: thrustmaster: Initialized pointer twi with NULL rather than 0

From: Colin Ian King <hidden>
Date: 2021-09-25 22:26:25

On 25/09/2021 23:22, Colin King wrote:
quoted hunk
From: Colin Ian King <redacted>

Pointers should be initialized with NULL rather than 0. Fix this.

Signed-off-by: Colin Ian King <redacted>
---
 drivers/hid/hid-thrustmaster.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c
index d44550aa8805..aa874f075bf9 100644
--- a/drivers/hid/hid-thrustmaster.c
+++ b/drivers/hid/hid-thrustmaster.c
@@ -205,7 +205,7 @@ static void thrustmaster_model_handler(struct urb *urb)
 	struct tm_wheel *tm_wheel = hid_get_drvdata(hdev);
 	uint16_t model = 0;
 	int i, ret;
-	const struct tm_wheel_info *twi = 0;
+	const struct tm_wheel_info *twi = NULL;
 
 	if (urb->status) {
 		hid_err(hdev, "URB to get model id failed with error %d\n", urb->status);
NACK, I spotted another pointer than needs the same change, will send a V2.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help