From: Jason Gerecke <killertofu@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>, Jiri Kosina <jkosina@suse.cz>
Cc: linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] HID: wacom: NULL dereferences on error in probe()
Date: Thu, 25 Jun 2015 13:59:17 -0700 [thread overview]
Message-ID: <558C6BA5.8040905@gmail.com> (raw)
In-Reply-To: <20150624142743.GA1702@mwanda>
On 6/24/2015 7:27 AM, Dan Carpenter wrote:
> We can't pass a NULL to input_unregister_device().
>
> Fixes: 2a6cdbdd4cc0 ('HID: wacom: Introduce new 'touch_input' device')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Looks reasonable to me.
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
--
Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one /
(That is to say, eight) to the two, /
But you can’t take seven from three, /
So you look at the sixty-fours....
> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> index 4c0ffca..44958d7 100644
> --- a/drivers/hid/wacom_sys.c
> +++ b/drivers/hid/wacom_sys.c
> @@ -1271,11 +1271,13 @@ fail_leds:
> pad_input_dev = NULL;
> wacom_wac->pad_registered = false;
> fail_register_pad_input:
> - input_unregister_device(touch_input_dev);
> + if (touch_input_dev)
> + input_unregister_device(touch_input_dev);
> wacom_wac->touch_input = NULL;
> wacom_wac->touch_registered = false;
> fail_register_touch_input:
> - input_unregister_device(pen_input_dev);
> + if (pen_input_dev)
> + input_unregister_device(pen_input_dev);
> wacom_wac->pen_input = NULL;
> wacom_wac->pen_registered = false;
> fail_register_pen_input:
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-06-25 20:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-24 14:27 [patch] HID: wacom: NULL dereferences on error in probe() Dan Carpenter
2015-06-25 20:59 ` Jason Gerecke [this message]
2015-06-26 12:08 ` Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=558C6BA5.8040905@gmail.com \
--to=killertofu@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=jkosina@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).