mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 02:05:33 +00:00
Merge branch 'for-next/pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
This commit is contained in:
commit
2a713587f3
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user