diff mbox series

cmtp: fix argument error

Message ID 20230331064520.1320749-1-michenyuan@huawei.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series cmtp: fix argument error | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Chenyuan Mi March 31, 2023, 6:45 a.m. UTC
Fix this issue by using BTPROTO_CMTP as argument instead of BTPROTO_HIDP.

Signed-off-by: Chenyuan Mi <michenyuan@huawei.com>
---
 net/bluetooth/cmtp/sock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Horman March 31, 2023, 5:33 p.m. UTC | #1
On Fri, Mar 31, 2023 at 02:45:20PM +0800, Chenyuan Mi wrote:
> Fix this issue by using BTPROTO_CMTP as argument instead of BTPROTO_HIDP.

Thanks for your patch. Some things you may want to consider:

* I think it would be good to describe what the effect of this problem is,
  if it can be observed. And if not, say so. I think it would
  also be useful to state how the problem was found. F.e. using a tool, or
  by inspection.

* As this is described as a fix, it should probably have a fixes tag.
  I think it would be:

Fixes: 8c8de589cedd ("Bluetooth: Added /proc/net/cmtp via bt_procfs_init()")
> Signed-off-by: Chenyuan Mi <michenyuan@huawei.com>
> ---
>  net/bluetooth/cmtp/sock.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Code change looks good.

> diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c
> index 96d49d9fae96..cf4370055ce2 100644
> --- a/net/bluetooth/cmtp/sock.c
> +++ b/net/bluetooth/cmtp/sock.c
> @@ -250,7 +250,7 @@ int cmtp_init_sockets(void)
>  	err = bt_procfs_init(&init_net, "cmtp", &cmtp_sk_list, NULL);
>  	if (err < 0) {
>  		BT_ERR("Failed to create CMTP proc file");
> -		bt_sock_unregister(BTPROTO_HIDP);
> +		bt_sock_unregister(BTPROTO_CMTP);
>  		goto error;
>  	}
>  
> -- 
> 2.25.1
diff mbox series

Patch

diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c
index 96d49d9fae96..cf4370055ce2 100644
--- a/net/bluetooth/cmtp/sock.c
+++ b/net/bluetooth/cmtp/sock.c
@@ -250,7 +250,7 @@  int cmtp_init_sockets(void)
 	err = bt_procfs_init(&init_net, "cmtp", &cmtp_sk_list, NULL);
 	if (err < 0) {
 		BT_ERR("Failed to create CMTP proc file");
-		bt_sock_unregister(BTPROTO_HIDP);
+		bt_sock_unregister(BTPROTO_CMTP);
 		goto error;
 	}