aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorH Hartley Sweeten <[email protected]>2009-10-07 17:08:08 -0400
committerDavid Woodhouse <[email protected]>2009-10-17 15:41:11 +0100
commitd4702669b0b64b8fa7c91123639ec20d9592ee43 (patch)
treea5f0be652b0a21b52194814de874a91d5cbe0358 /tools/perf/scripts/python
parentf54d6336372b97d3624d1c5c179b2dd062472bd1 (diff)
mtd: fix memory leak in mtd_dataflash
Fix a potential memory leak in mtd_dataflash driver. The private data that is allocated when registering a DataFlash device with the MTD subsystem is not released if an error occurs when add_mtd_partitions() or add_mtd_device() is called. Fix this by adding an error path. The memory is already released during a remove. Also, add a dev_set_drvdata(&spi->dev, NULL) before the kfree() so that the spi device does not reference invalid data. Signed-off-by: H Hartley Sweeten <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions