* [PATCH] HID: thrustmaster: Initialized pointer twi with NULL rather than 0
@ 2021-09-25 22:22 Colin King
2021-09-25 22:26 ` NAK: " Colin Ian King
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-09-25 22:22 UTC (permalink / raw)
To: Jiri Kosina, Alexandre Torgue, linux-input, linux-stm32,
linux-arm-kernel
Cc: kernel-janitors, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* NAK: [PATCH] HID: thrustmaster: Initialized pointer twi with NULL rather than 0
2021-09-25 22:22 [PATCH] HID: thrustmaster: Initialized pointer twi with NULL rather than 0 Colin King
@ 2021-09-25 22:26 ` Colin Ian King
0 siblings, 0 replies; 2+ messages in thread
From: Colin Ian King @ 2021-09-25 22:26 UTC (permalink / raw)
To: Jiri Kosina, Alexandre Torgue, linux-input, linux-stm32,
linux-arm-kernel
Cc: kernel-janitors, linux-kernel
On 25/09/2021 23:22, Colin King wrote:
> 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);
>
NACK, I spotted another pointer than needs the same change, will send a V2.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-25 22:26 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:22 [PATCH] HID: thrustmaster: Initialized pointer twi with NULL rather than 0 Colin King
2021-09-25 22:26 ` NAK: " Colin Ian King
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).