diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-11-02 10:11:37 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-11-02 10:11:37 +0000 |
| commit | 8a8c493942048b466efa38d72405f33366c55f3f (patch) | |
| tree | 396ddfd2e094d79206d2528829c37de7cb3e6e7a /hw/ide/core.c | |
| parent | 47ba789c97c8d201d01058b00a14d8a9a85fcfe9 (diff) | |
| parent | 96f43c2b0a663f4789b51ed97297163321e7ba5e (diff) | |
| download | focaccia-qemu-8a8c493942048b466efa38d72405f33366c55f3f.tar.gz focaccia-qemu-8a8c493942048b466efa38d72405f33366c55f3f.zip | |
Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging
# gpg: Signature made Tue 31 Oct 2017 23:01:18 GMT # gpg: using RSA key 0x7DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * remotes/jnsnow/tags/ide-pull-request: ide: avoid referencing NULL dev in rotational rate setting hw/ide/ahci: Move allwinner code into a separate file Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ide/core.c')
| -rw-r--r-- | hw/ide/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index a04766aee7..471d0c928b 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -208,7 +208,9 @@ static void ide_identify(IDEState *s) if (dev && dev->conf.discard_granularity) { put_le16(p + 169, 1); /* TRIM support */ } - put_le16(p + 217, dev->rotation_rate); /* Nominal media rotation rate */ + if (dev) { + put_le16(p + 217, dev->rotation_rate); /* Nominal media rotation rate */ + } ide_identify_size(s); s->identify_set = 1; |