qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] lsi53c895a: avoid calling a NULL function
@ 2010-09-02 13:37 Bernhard Kohl
  2010-09-02 14:45 ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Kohl @ 2010-09-02 13:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Bernhard Kohl

In scsi-generic the reset() function is not available.

Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
---
 hw/lsi53c895a.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 5eaf69e..01ff028 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -1597,7 +1597,9 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
                 for (id = 0; id < s->bus.ndev; id++) {
                     if (s->bus.devs[id]) {
                         dev = &s->bus.devs[id]->qdev;
-                        dev->info->reset(dev);
+                        if (dev->info->reset) {
+                            dev->info->reset(dev);
+                        }
                     }
                 }
                 s->sstat0 |= LSI_SSTAT0_RST;
-- 
1.7.2.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-06  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02 13:37 [Qemu-devel] [PATCH] lsi53c895a: avoid calling a NULL function Bernhard Kohl
2010-09-02 14:45 ` Kevin Wolf
2010-09-06  9:30   ` Bernhard Kohl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).