* [PATCH][V2] HID:Thrustmaster: Initialized pointers with NULL rather than 0
@ 2021-09-25 22:29 ` Colin King
0 siblings, 0 replies; 2+ messages in thread
From: Colin King @ 2021-09-25 22:29 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires, Alexandre Torgue, linux-input,
linux-stm32, linux-arm-kernel
Cc: kernel-janitors, linux-kernel
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 --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) {
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH][V2] HID:Thrustmaster: Initialized pointers with NULL rather than 0
@ 2021-09-25 22:29 ` Colin King
0 siblings, 0 replies; 2+ messages in thread
From: Colin King @ 2021-09-25 22:29 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires, Alexandre Torgue, linux-input,
linux-stm32, linux-arm-kernel
Cc: kernel-janitors, linux-kernel
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 --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) {
--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-25 22:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-25 22:29 [PATCH][V2] HID:Thrustmaster: Initialized pointers with NULL rather than 0 Colin King
2021-09-25 22:29 ` Colin King
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.