Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH 16/19] HID: hid-multitouch: Remove misleading null test

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


rydberg at euromail

Aug 12, 2012, 2:42 PM

Post #1 of 2 (110 views)
Permalink
[PATCH 16/19] HID: hid-multitouch: Remove misleading null test

A null test was left behind during the autoloading work;
the test was introduced by 8d179a9e, but was never completely
reverted.

Reported-by: Dan Carpenter <dan.carpenter [at] oracle>
Signed-off-by: Henrik Rydberg <rydberg [at] euromail>
---
drivers/hid/hid-multitouch.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index c400d90..b15133c 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -691,12 +691,10 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
struct mt_device *td;
struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */

- if (id) {
- for (i = 0; mt_classes[i].name ; i++) {
- if (id->driver_data == mt_classes[i].name) {
- mtclass = &(mt_classes[i]);
- break;
- }
+ for (i = 0; mt_classes[i].name ; i++) {
+ if (id->driver_data == mt_classes[i].name) {
+ mtclass = &(mt_classes[i]);
+ break;
}
}

--
1.7.11.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


benjamin.tissoires at gmail

Aug 20, 2012, 6:35 AM

Post #2 of 2 (97 views)
Permalink
Re: [PATCH 16/19] HID: hid-multitouch: Remove misleading null test [In reply to]

Acked-by: Benjamin Tissoires <benjamin.tissoires [at] enac>

On Sun, Aug 12, 2012 at 11:42 PM, Henrik Rydberg <rydberg [at] euromail> wrote:
> A null test was left behind during the autoloading work;
> the test was introduced by 8d179a9e, but was never completely
> reverted.
>
> Reported-by: Dan Carpenter <dan.carpenter [at] oracle>
> Signed-off-by: Henrik Rydberg <rydberg [at] euromail>
> ---
> drivers/hid/hid-multitouch.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index c400d90..b15133c 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -691,12 +691,10 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
> struct mt_device *td;
> struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */
>
> - if (id) {
> - for (i = 0; mt_classes[i].name ; i++) {
> - if (id->driver_data == mt_classes[i].name) {
> - mtclass = &(mt_classes[i]);
> - break;
> - }
> + for (i = 0; mt_classes[i].name ; i++) {
> + if (id->driver_data == mt_classes[i].name) {
> + mtclass = &(mt_classes[i]);
> + break;
> }
> }
>
> --
> 1.7.11.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo [at] vger
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.