mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
sandbox: spi: Remove an incorrect free()
We must not free data that is managed by driver mode. Remove this line, which is a hangover from the pre-driver-model code. This fixes a problem where 'sf probe' crashes U-Boot if the backing file for the SPI flash cannot be found. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jteki@openedev.com> Tested-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
20f655da11
commit
ffe276d27a
1 changed files with 0 additions and 1 deletions
|
@ -187,7 +187,6 @@ static int sandbox_sf_probe(struct udevice *dev)
|
||||||
|
|
||||||
sbsf->fd = os_open(pdata->filename, 02);
|
sbsf->fd = os_open(pdata->filename, 02);
|
||||||
if (sbsf->fd == -1) {
|
if (sbsf->fd == -1) {
|
||||||
free(sbsf);
|
|
||||||
printf("%s: unable to open file '%s'\n", __func__,
|
printf("%s: unable to open file '%s'\n", __func__,
|
||||||
pdata->filename);
|
pdata->filename);
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
|
|
Loading…
Add table
Reference in a new issue