All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-damon-implement-a-minimal-stub-for-sysfs-based-damon-interface-fix.patch added to -mm tree
@ 2022-03-02 22:26 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-03-02 22:26 UTC (permalink / raw)
  To: mm-commits, sj, abaci, jiapeng.chong, akpm


The patch titled
     Subject: mm/damon/sysfs: fix missing error code in damon_sysfs_attrs_add_dirs()
has been added to the -mm tree.  Its filename is
     mm-damon-implement-a-minimal-stub-for-sysfs-based-damon-interface-fix.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-damon-implement-a-minimal-stub-for-sysfs-based-damon-interface-fix.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-damon-implement-a-minimal-stub-for-sysfs-based-damon-interface-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Subject: mm/damon/sysfs: fix missing error code in damon_sysfs_attrs_add_dirs()

The error code is missing in this code scenario, add the error code
'-ENOMEM' to the return value 'err'.

Eliminate the follow smatch warning:

mm/damon/sysfs.c:1647 damon_sysfs_attrs_add_dirs() warn: missing error
code 'err'.

Link: https://lkml.kernel.org/r/20220302111120.24984-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/damon/sysfs.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/mm/damon/sysfs.c~mm-damon-implement-a-minimal-stub-for-sysfs-based-damon-interface-fix
+++ a/mm/damon/sysfs.c
@@ -452,8 +452,10 @@ static int damon_sysfs_attrs_add_dirs(st
 	attrs->intervals = intervals;
 
 	nr_regions_range = damon_sysfs_ul_range_alloc(10, 1000);
-	if (!nr_regions_range)
+	if (!nr_regions_range) {
+		err = -ENOMEM;
 		goto put_intervals_out;
+	}
 
 	err = kobject_init_and_add(&nr_regions_range->kobj,
 			&damon_sysfs_ul_range_ktype, &attrs->kobj,
_

Patches currently in -mm which might be from jiapeng.chong@linux.alibaba.com are

mm-vmallocc-fix-unused-function-warning.patch
mm-damon-implement-a-minimal-stub-for-sysfs-based-damon-interface-fix.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-02 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 22:26 + mm-damon-implement-a-minimal-stub-for-sysfs-based-damon-interface-fix.patch added to -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.