mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel: params: Remove unnecessary ‘0’ values from err
@ 2023-07-11 19:43 Li zeming
  2023-07-10  3:33 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Li zeming @ 2023-07-11 19:43 UTC (permalink / raw)
  To: mcgrof, linux, mbenes, rafael, linux, gregkh, christophe.jaillet
  Cc: linux-kernel, Li zeming

err is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/params.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/params.c b/kernel/params.c
index 6a7548979aa9..f8837a5f2c3e 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -331,7 +331,7 @@ EXPORT_SYMBOL(param_ops_bool);
 
 int param_set_bool_enable_only(const char *val, const struct kernel_param *kp)
 {
-	int err = 0;
+	int err;
 	bool new_value;
 	bool orig_value = *(bool *)kp->arg;
 	struct kernel_param dummy_kp = *kp;
-- 
2.18.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-10 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 19:43 [PATCH] kernel: params: Remove unnecessary ‘0’ values from err Li zeming
2023-07-10  3:33 ` Randy Dunlap
2023-07-10 19:47   ` Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®