projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
scripts/gdb: add get_target_endianness helper
[firefly-linux-kernel-4.4.55.git]
/
lib
/
genalloc.c
diff --git
a/lib/genalloc.c
b/lib/genalloc.c
index 2e65d206b01c13d3ad02a57c3d0842b89c8637bd..d214866eeea2cff341cbe76ec0b09c15b05f6ad2 100644
(file)
--- a/
lib/genalloc.c
+++ b/
lib/genalloc.c
@@
-34,7
+34,6
@@
#include <linux/rculist.h>
#include <linux/interrupt.h>
#include <linux/genalloc.h>
#include <linux/rculist.h>
#include <linux/interrupt.h>
#include <linux/genalloc.h>
-#include <linux/of_address.h>
#include <linux/of_device.h>
static inline size_t chunk_size(const struct gen_pool_chunk *chunk)
#include <linux/of_device.h>
static inline size_t chunk_size(const struct gen_pool_chunk *chunk)
@@
-415,7
+414,7
@@
bool addr_in_gen_pool(struct gen_pool *pool, unsigned long start,
size_t size)
{
bool found = false;
size_t size)
{
bool found = false;
- unsigned long end = start + size;
+ unsigned long end = start + size
- 1
;
struct gen_pool_chunk *chunk;
rcu_read_lock();
struct gen_pool_chunk *chunk;
rcu_read_lock();
@@
-587,6
+586,8
@@
struct gen_pool *devm_gen_pool_create(struct device *dev, int min_alloc_order,
struct gen_pool **ptr, *pool;
ptr = devres_alloc(devm_gen_pool_release, sizeof(*ptr), GFP_KERNEL);
struct gen_pool **ptr, *pool;
ptr = devres_alloc(devm_gen_pool_release, sizeof(*ptr), GFP_KERNEL);
+ if (!ptr)
+ return NULL;
pool = gen_pool_create(min_alloc_order, nid);
if (pool) {
pool = gen_pool_create(min_alloc_order, nid);
if (pool) {