[PATCH] selftests: net: convert comma to semicolon

2024-09-03 Thread Chen Ni
Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni --- tools/testing/selftests/net/psock_fanout.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/psock_fanout.c b/tools/testing/selftests/net/psock_fanout.c

[PATCH v2] selftests: net: convert comma to semicolon

2024-09-03 Thread Chen Ni
Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. C

[PATCH] nvdimm: of_pmem: Add kfree for kstrdup

2023-08-27 Thread Chen Ni
Add kfree() for kstrdup() in order to avoid memory leak. Signed-off-by: Chen Ni --- drivers/nvdimm/of_pmem.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/nvdimm/of_pmem.c b/drivers/nvdimm/of_pmem.c index 10dbdcdfb9ce..fe6edb7e6631 100644 --- a/drivers/nvdimm/of_pmem.c +++ b

[PATCH v2] nvdimm: of_pmem: Check return value and add kfree for kstrdup

2023-08-28 Thread Chen Ni
Check the return value of kstrdup() and add kfree() for kstrdup() to avoid memory leak. Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus provider") Signed-off-by: Chen Ni --- Changelog: v1 -> v2: 1.Add a fixes tag. 2.Update commit message. --- drivers/nvd

[PATCH v3] libnvdimm/of_pmem: Use devm_kstrdup instead of kstrdup and check its return value

2023-09-14 Thread Chen Ni
Use devm_kstrdup() instead of kstrdup() and check its return value to avoid memory leak. Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus provider") Signed-off-by: Chen Ni --- Changelog: v2 -> v3: 1. Use devm_kstrdup() instead of kstrdup() v1 -> v2: 1.

[PATCH] input: misc: remove needless check before usb_free_coherent()

2020-06-29 Thread Chen Ni
From: Xu Wang usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang --- drivers/input/misc/cm109.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index c09b9628ad34.

[PATCH] net: zydas: remove needless check before usb_free_coherent()

2020-06-30 Thread Chen Ni
From: Xu Wang usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang --- drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wi

[PATCH] kernel: events: use offset_in_page macro

2020-06-30 Thread Chen Ni
From: Xu Wang Use offset_in_page macro instead of (addr & ~PAGE_MASK). Signed-off-by: Xu Wang --- kernel/events/uprobes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index bb0862873dba..44d175d81ed6 100644 --- a/ke