@@ -579,7 +579,6 @@ static struct dma_pool *ttm_dma_pool_init(struct device *dev, gfp_t flags,
struct device_pools *sec_pool = NULL;
struct dma_pool *pool = NULL, **ptr;
unsigned i;
- int ret = -ENODEV;
char *p;
if (!dev)
@@ -589,8 +588,6 @@ static struct dma_pool *ttm_dma_pool_init(struct device *dev, gfp_t flags,
if (!ptr)
return NULL;
- ret = -ENOMEM;
-
pool = kmalloc_node(sizeof(struct dma_pool), GFP_KERNEL,
dev_to_node(dev));
if (!pool)
@@ -644,7 +641,7 @@ err_mem:
devres_free(ptr);
kfree(sec_pool);
kfree(pool);
- return ERR_PTR(ret);
+ return ERR_PTR(-ENOMEM);
}
static struct dma_pool *ttm_dma_find_pool(struct device *dev,