diff mbox series

[V2] HID:Thrustmaster: Initialized pointers with NULL rather than 0

Message ID 20210925222915.182365-1-colin.king@canonical.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show
Series [V2] HID:Thrustmaster: Initialized pointers with NULL rather than 0 | expand

Commit Message

Colin King Sept. 25, 2021, 10:29 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointers twi and tm_wheel should be initialized with NULL rather than 0.
Fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
V2: Fix tm_wheel too
---
 drivers/hid/hid-thrustmaster.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c
index d44550aa8805..5bc9b7756183 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);
@@ -272,7 +272,7 @@  static void thrustmaster_remove(struct hid_device *hdev)
 static int thrustmaster_probe(struct hid_device *hdev, const struct hid_device_id *id)
 {
 	int ret = 0;
-	struct tm_wheel *tm_wheel = 0;
+	struct tm_wheel *tm_wheel = NULL;
 
 	ret = hid_parse(hdev);
 	if (ret) {