lkml.org 
[lkml]   [2021]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] HID: thrustmaster: Initialized pointer twi with NULL rather than 0
Date
From: Colin Ian King <colin.king@canonical.com>

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
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
\
 
 \ /
  Last update: 2021-09-26 00:23    [W:0.028 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site