From: Chanwoo Choi <cw00.choi@samsung.com>
To: Jonghwa Lee <jonghwa3.lee@samsung.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
MyungJoo Ham <myungjoo.ham@samsung.com>
Subject: Re: [PATCH] extcon: class: Add NULL pointer checking for removing notifier block.
Date: Fri, 14 Jun 2013 16:17:49 +0900 [thread overview]
Message-ID: <51BAC39D.6020909@samsung.com> (raw)
In-Reply-To: <1371175897-3001-1-git-send-email-jonghwa3.lee@samsung.com>
On 06/14/2013 11:11 AM, Jonghwa Lee wrote:
> This patch adds NULL pointer checking of extcon device to 'extcon_unregister
> _interest' which unregisters extcon notifier block.
>
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
> ---
> drivers/extcon/extcon-class.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c
> index 8c69803..23f11ea 100644
> --- a/drivers/extcon/extcon-class.c
> +++ b/drivers/extcon/extcon-class.c
> @@ -491,7 +491,7 @@ EXPORT_SYMBOL_GPL(extcon_register_interest);
> */
> int extcon_unregister_interest(struct extcon_specific_cable_nb *obj)
> {
> - if (!obj)
> + if (!obj || !obj->edev)
> return -EINVAL;
>
> return raw_notifier_chain_unregister(&obj->edev->nh, &obj->internal_nb);
>
Applied it.
Thanks,
Chanwoo Choi
prev parent reply other threads:[~2013-06-14 7:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 2:11 [PATCH] extcon: class: Add NULL pointer checking for removing notifier block Jonghwa Lee
2013-06-14 7:17 ` Chanwoo Choi [this message]
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=51BAC39D.6020909@samsung.com \
--to=cw00.choi@samsung.com \
--cc=jonghwa3.lee@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
/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 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.