Merge branch 'for-next/pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git

This commit is contained in:
Stephen Rothwell 2025-01-13 10:48:15 +11:00
commit 2a713587f3
2 changed files with 7 additions and 2 deletions

View File

@ -89,7 +89,7 @@ static struct pstore_device_info *pstore_device_info;
_##name_ = check_size(name, alignsize); \
else \
_##name_ = 0; \
/* Synchronize module parameters with resuls. */ \
/* Synchronize module parameters with results. */ \
name = _##name_ / 1024; \
dev->zone.name = _##name_; \
}
@ -121,7 +121,7 @@ static int __register_pstore_device(struct pstore_device_info *dev)
if (pstore_device_info)
return -EBUSY;
/* zero means not limit on which backends to attempt to store. */
/* zero means no limit on which backends attempt to store. */
if (!dev->flags)
dev->flags = UINT_MAX;

View File

@ -1212,6 +1212,11 @@ static struct pstore_zone **psz_init_zones(enum pstore_type_id type,
}
c = total_size / record_size;
if (unlikely(!c)) {
pr_err("zone %s total_size too small\n", name);
return ERR_PTR(-EINVAL);
}
zones = kcalloc(c, sizeof(*zones), GFP_KERNEL);
if (!zones) {
pr_err("allocate for zones %s failed\n", name);