From: Frank Rowand <frowand.list@gmail.com>
To: Dan Carpenter
<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] of/unittest: Missing unlocks on error
Date: Thu, 04 May 2017 00:05:29 +0000 [thread overview]
Message-ID: <590A7049.3070108@gmail.com> (raw)
In-Reply-To: <20170503194950.4xbdbwybvx6dkadx@mwanda>
On 05/03/17 12:49, Dan Carpenter wrote:
> Static checkers complain that we should unlock before returning. Which
> is true.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
> index 12597ff8cfb0..425338d6286d 100644
> --- a/drivers/of/unittest.c
> +++ b/drivers/of/unittest.c
> @@ -2210,14 +2210,14 @@ static __init void of_unittest_overlay_high_level(void)
> unittest(0,
> "duplicate property '%s' in overlay_base node __symbols__",
> prop->name);
> - return;
> + goto err_unlock;
> }
> ret = __of_add_property_sysfs(of_symbols, prop);
> if (ret) {
> unittest(0,
> "unable to add property '%s' in overlay_base node __symbols__ to sysfs",
> prop->name);
> - return;
> + goto err_unlock;
> }
> }
> }
> @@ -2232,6 +2232,10 @@ static __init void of_unittest_overlay_high_level(void)
>
> unittest(overlay_data_add(2),
> "Adding overlay 'overlay_bad_phandle' failed\n");
> + return;
> +
> +err_unlock:
> + mutex_unlock(&of_mutex);
> }
>
> #else
>
Thanks Dan.
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
WARNING: multiple messages have this Message-ID (diff)
From: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Dan Carpenter
<dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] of/unittest: Missing unlocks on error
Date: Wed, 3 May 2017 17:05:29 -0700 [thread overview]
Message-ID: <590A7049.3070108@gmail.com> (raw)
In-Reply-To: <20170503194950.4xbdbwybvx6dkadx@mwanda>
On 05/03/17 12:49, Dan Carpenter wrote:
> Static checkers complain that we should unlock before returning. Which
> is true.
>
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>
> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
> index 12597ff8cfb0..425338d6286d 100644
> --- a/drivers/of/unittest.c
> +++ b/drivers/of/unittest.c
> @@ -2210,14 +2210,14 @@ static __init void of_unittest_overlay_high_level(void)
> unittest(0,
> "duplicate property '%s' in overlay_base node __symbols__",
> prop->name);
> - return;
> + goto err_unlock;
> }
> ret = __of_add_property_sysfs(of_symbols, prop);
> if (ret) {
> unittest(0,
> "unable to add property '%s' in overlay_base node __symbols__ to sysfs",
> prop->name);
> - return;
> + goto err_unlock;
> }
> }
> }
> @@ -2232,6 +2232,10 @@ static __init void of_unittest_overlay_high_level(void)
>
> unittest(overlay_data_add(2),
> "Adding overlay 'overlay_bad_phandle' failed\n");
> + return;
> +
> +err_unlock:
> + mutex_unlock(&of_mutex);
> }
>
> #else
>
Thanks Dan.
Reviewed-by: Frank Rowand <frank.rowand-7U/KSKJipcs@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-05-04 0:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 19:49 [PATCH] of/unittest: Missing unlocks on error Dan Carpenter
2017-05-03 19:49 ` Dan Carpenter
2017-05-04 0:05 ` Frank Rowand [this message]
2017-05-04 0:05 ` Frank Rowand
2017-05-04 16:09 ` Rob Herring
2017-05-04 16:09 ` Rob Herring
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=590A7049.3070108@gmail.com \
--to=frowand.list@gmail.com \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 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.