* [PATCH] mm: Remove unnecessary '0' values from err
@ 2022-09-05 2:09 Li zeming
0 siblings, 0 replies; only message in thread
From: Li zeming @ 2022-09-05 2:09 UTC (permalink / raw)
To: mike.kravetz, songmuchun, akpm; +Cc: linux-mm, linux-kernel, Li zeming
First execute the kstrtoul function and assign a value to err.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index e070b8593b37..be7a2c4081fc 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3714,7 +3714,7 @@ static ssize_t demote_store(struct kobject *kobj,
unsigned long nr_available;
nodemask_t nodes_allowed, *n_mask;
struct hstate *h;
- int err = 0;
+ int err;
int nid;
err = kstrtoul(buf, 10, &nr_demote);
--
2.18.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-05 2:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 2:09 [PATCH] mm: Remove unnecessary '0' values from err Li zeming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox