aboutsummaryrefslogtreecommitdiff
path: root/CODING_STYLE
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-03-16 17:06:02 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-03-16 17:12:46 +0000
commit10b27d1ab391dbf36f92e1a33179662082401d7a (patch)
tree9b57a787ffb3749b142e5dcc8907c1d79f9a2567 /CODING_STYLE
parent2aa47baded9083241e5fbc9db7dadd32a8e96941 (diff)
sd: Fix "info qtree" on boards with SD cardspull-target-arm-20160316
The SD card object is not a SysBusDevice, so don't create it with qdev_create() if we're not assigning it to a specific bus; use object_new() instead. This was causing 'info qtree' to segfault on boards with SD cards, because qdev_create(NULL, TYPE_FOO) puts the created object on the system bus, and then we may try to run functions like sysbus_dev_print() on it, which fail when casting the object to SysBusDevice. (This is the same mistake that we made with the NAND device and fixed in commit 6749695eaaf346c1.) Reported-by: xiaoqiang.zhao <zxq_yx_007@163.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: xiaoqiang.zhao <zxq_yx_007@163.com> Message-id: 1458061009-7733-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'CODING_STYLE')
0 files changed, 0 insertions, 0 deletions