]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ieee1394/nodemgr.c
mm: Add NR_WRITEBACK_TEMP counter
[linux-2.6-omap-h63xx.git] / drivers / ieee1394 / nodemgr.c
index 511e4321c6b6220916a37b05c81d490bce9f4a47..29d833e71cbfbc3c8ef0be7137186cc07afa553e 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/moduleparam.h>
 #include <linux/mutex.h>
 #include <linux/freezer.h>
+#include <linux/semaphore.h>
 #include <asm/atomic.h>
-#include <asm/semaphore.h>
 
 #include "csr.h"
 #include "highlevel.h"
@@ -701,7 +701,11 @@ static int nodemgr_bus_match(struct device * dev, struct device_driver * drv)
                return 0;
 
        driver = container_of(drv, struct hpsb_protocol_driver, driver);
-       for (id = driver->id_table; id->match_flags != 0; id++) {
+       id = driver->id_table;
+       if (!id)
+               return 0;
+
+       for (; id->match_flags != 0; id++) {
                if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) &&
                    id->vendor_id != ud->vendor_id)
                        continue;