diff --git a/drivers/ub/obmm/obmm_shm_dev.c b/drivers/ub/obmm/obmm_shm_dev.c index f651399e712d65460c3013dd3ba167b4e34028c5..37e97d56e24d1b34f49de9a4491ddb54e99d8a08 100644 --- a/drivers/ub/obmm/obmm_shm_dev.c +++ b/drivers/ub/obmm/obmm_shm_dev.c @@ -874,9 +874,6 @@ const struct file_operations obmm_shm_fops = { .owner = THIS_MODULE, static void obmm_shm_dev_release(struct device *dev) { - struct obmm_region *reg; - - reg = container_of(dev, struct obmm_region, device); module_put(THIS_MODULE); } diff --git a/drivers/ub/obmm/ubmempool_allocator.c b/drivers/ub/obmm/ubmempool_allocator.c index a0a3e7060edd22f8a4ef7b9884ba256fffecc5bc..b84ac40e614e5ee4164f0d7cc61f8b671464a4e7 100644 --- a/drivers/ub/obmm/ubmempool_allocator.c +++ b/drivers/ub/obmm/ubmempool_allocator.c @@ -479,7 +479,7 @@ static int init_mem_allocator_granu(enum allocator_id aid) if (!mem_allocator_granu) { if (aid == ALLOCATOR_HUGETLB_PUD) __obmm_memseg_size = PUD_SIZE; - else if (aid == ALLOCATOR_HUGETLB_PMD) + else __obmm_memseg_size = PMD_SIZE; return 0; }