diff mbox

[2/2] nfc: remove unneeded nfc_put_device() calls

Message ID 31741678.fEkJSmnf5n@daeseok-laptop.cloud.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Daeseok Youn April 2, 2014, 7:56 a.m. UTC
If local is NULL, nfs_put_device() is called twice.
So nfs_put_device() in "if (!local)" is removed.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 net/nfc/netlink.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Daeseok Youn April 14, 2014, 2:19 a.m. UTC | #1
Hi,

Can you review this patch?

Thanks.
Daeseok Youn

2014-04-02 16:56 GMT+09:00 Daeseok Youn <daeseok.youn@gmail.com>:
>
> If local is NULL, nfs_put_device() is called twice.
> So nfs_put_device() in "if (!local)" is removed.
>
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
>  net/nfc/netlink.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
> index b2ad570..3e0a676 100644
> --- a/net/nfc/netlink.c
> +++ b/net/nfc/netlink.c
> @@ -1038,7 +1038,6 @@ static int nfc_genl_llc_sdreq(struct sk_buff *skb, struct genl_info *info)
>
>         local = nfc_llcp_find_local(dev);
>         if (!local) {
> -               nfc_put_device(dev);
>                 rc = -ENODEV;
>                 goto exit;
>         }
> --
> 1.7.4.4
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index b2ad570..3e0a676 100644
--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -1038,7 +1038,6 @@  static int nfc_genl_llc_sdreq(struct sk_buff *skb, struct genl_info *info)
 
 	local = nfc_llcp_find_local(dev);
 	if (!local) {
-		nfc_put_device(dev);
 		rc = -ENODEV;
 		goto exit;
 	}