LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>,
jkosina@suse.cz, lkml <linux-kernel@vger.kernel.org>,
"open list:HID CORE LAYER" <linux-input@vger.kernel.org>
Subject: Re: [PATCH] HID: wacom: Release device resource data obtained by devres_alloc()
Date: Tue, 24 Apr 2018 11:04:02 +0200 [thread overview]
Message-ID: <CAO-hwJ+cM2nPPiQbHM=u2E0vzvdztR9CFtQD5xztLw8QPOBPbA@mail.gmail.com> (raw)
In-Reply-To: <9b8c9c6134cb27ee8ac37224098e382ab9189d62.1524556744.git.arvind.yadav.cs@gmail.com>
On Tue, Apr 24, 2018 at 10:03 AM, Arvind Yadav
<arvind.yadav.cs@gmail.com> wrote:
> Free device resource data, if __wacom_devm_sysfs_create_group
> is not successful.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
Looks good to me:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cheers,
Benjamin
> drivers/hid/wacom_sys.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> index b54ef1f..ee7a37e 100644
> --- a/drivers/hid/wacom_sys.c
> +++ b/drivers/hid/wacom_sys.c
> @@ -1213,8 +1213,10 @@ static int __wacom_devm_sysfs_create_group(struct wacom *wacom,
> devres->root = root;
>
> error = sysfs_create_group(devres->root, group);
> - if (error)
> + if (error) {
> + devres_free(devres);
> return error;
> + }
>
> devres_add(&wacom->hdev->dev, devres);
>
> --
> 1.9.1
>
next prev parent reply other threads:[~2018-04-24 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-24 8:03 Arvind Yadav
2018-04-24 9:04 ` Benjamin Tissoires [this message]
2018-04-25 8:51 ` 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='CAO-hwJ+cM2nPPiQbHM=u2E0vzvdztR9CFtQD5xztLw8QPOBPbA@mail.gmail.com' \
--to=benjamin.tissoires@redhat.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=jikos@kernel.org \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH] HID: wacom: Release device resource data obtained by devres_alloc()' \
/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
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).