mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-25 07:41:40 +02:00
mtd: pxa3xx_nand: remove dead code
The kfree() call is unreachable, and is not needed. Remove this call and the fail_disable_clk label. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
This commit is contained in:
parent
8dddfff4d8
commit
6d1edab44c
@ -1768,7 +1768,7 @@ static int alloc_nand_resource(struct pxa3xx_nand_info *info)
|
|||||||
struct pxa3xx_nand_host *host;
|
struct pxa3xx_nand_host *host;
|
||||||
struct nand_chip *chip = NULL;
|
struct nand_chip *chip = NULL;
|
||||||
struct mtd_info *mtd;
|
struct mtd_info *mtd;
|
||||||
int ret, cs;
|
int cs;
|
||||||
|
|
||||||
pdata = info->pdata;
|
pdata = info->pdata;
|
||||||
if (pdata->num_cs <= 0)
|
if (pdata->num_cs <= 0)
|
||||||
@ -1804,19 +1804,13 @@ static int alloc_nand_resource(struct pxa3xx_nand_info *info)
|
|||||||
/* Allocate a buffer to allow flash detection */
|
/* Allocate a buffer to allow flash detection */
|
||||||
info->buf_size = INIT_BUFFER_SIZE;
|
info->buf_size = INIT_BUFFER_SIZE;
|
||||||
info->data_buff = kmalloc(info->buf_size, GFP_KERNEL);
|
info->data_buff = kmalloc(info->buf_size, GFP_KERNEL);
|
||||||
if (info->data_buff == NULL) {
|
if (info->data_buff == NULL)
|
||||||
ret = -ENOMEM;
|
return -ENOMEM;
|
||||||
goto fail_disable_clk;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* initialize all interrupts to be disabled */
|
/* initialize all interrupts to be disabled */
|
||||||
disable_int(info, NDSR_MASK);
|
disable_int(info, NDSR_MASK);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
kfree(info->data_buff);
|
|
||||||
fail_disable_clk:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pxa3xx_nand_probe_dt(struct udevice *dev, struct pxa3xx_nand_info *info)
|
static int pxa3xx_nand_probe_dt(struct udevice *dev, struct pxa3xx_nand_info *info)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user