summaryrefslogtreecommitdiffstats
path: root/mm/damon/dbgfs.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-09-02 01:21:27 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-09-02 01:21:27 +0200
commit29250ba51bc1cbe8a87e923f76978b87c3247a8c (patch)
treeb6afc83e580ae3b746aa530434f56bb6fb80cc8b /mm/damon/dbgfs.c
parentMerge tag 'kvm-riscv-fixes-6.0-1' of https://github.com/kvm-riscv/linux into ... (diff)
parentKVM: s390: pci: Hook to access KVM lowlevel from VFIO (diff)
downloadlinux-29250ba51bc1cbe8a87e923f76978b87c3247a8c.tar.xz
linux-29250ba51bc1cbe8a87e923f76978b87c3247a8c.zip
Merge tag 'kvm-s390-master-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
PCI interpretation compile fixes
Diffstat (limited to 'mm/damon/dbgfs.c')
-rw-r--r--mm/damon/dbgfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c
index cb8a7e9926a4..cfdf63132d5a 100644
--- a/mm/damon/dbgfs.c
+++ b/mm/damon/dbgfs.c
@@ -818,6 +818,9 @@ static int dbgfs_mk_context(char *name)
return -ENOENT;
new_dir = debugfs_create_dir(name, root);
+ /* Below check is required for a potential duplicated name case */
+ if (IS_ERR(new_dir))
+ return PTR_ERR(new_dir);
dbgfs_dirs[dbgfs_nr_ctxs] = new_dir;
new_ctx = dbgfs_new_ctx();