diff options
| author | H Hartley Sweeten <[email protected]> | 2009-10-19 13:31:46 -0400 |
|---|---|---|
| committer | David Woodhouse <[email protected]> | 2009-10-20 09:36:04 +0900 |
| commit | 4b56ffcacee937a85bf39e14872dd141e23ee85f (patch) | |
| tree | da435281a3b348c2ed89d1f473bd0f78a1761069 /tools/perf/scripts/python | |
| parent | 2d098a725333990d265dfe4754d1b63032c35afb (diff) | |
mtd: Fix kernel NULL pointer dereference in physmap.c
During the probe for physmap platform flash devices there are a
number error exit conditions that all do a goto err_out which
then calls physmap_flash_remove(). In that function one of the
cleanup steps is:
#ifdef CONFIG_MTD_CONCAT
if (info->cmtd != info->mtd[0])
mtd_concat_destroy(info->cmtd);
#endif
This test will succeed since info->cmtd == NULL and info->mtd[0] is
valid.
Fix this by exiting the remove function when info->cmtd == NULL.
Also, cleanup the #ifdef CONFIG_MTD_PARTITIONS stuff by using
mtd_has_partitions().
Signed-off-by: H Hartley Sweeten <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions