Skip to content

Commit

Permalink
kernel: params: Remove unnecessary ‘0’ values from err
Browse files Browse the repository at this point in the history
err is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li zeming <[email protected]>
Reviewed-by: Randy Dunlap <[email protected]>
Signed-off-by: Luis Chamberlain <[email protected]>
  • Loading branch information
Li zeming authored and mcgrof committed Jul 10, 2023
1 parent c05780e commit 9ce170c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9ce170c

Please sign in to comment.