X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fieee1394%2Fnodemgr.c;h=05710c7c12206aa1a9fcca8bad4db2eac3be7697;hb=886c35fbcf6fb2eee15687efc2d64d99b6ad9a4a;hp=511e4321c6b6220916a37b05c81d490bce9f4a47;hpb=b297d520b9af536d5580ac505dd316be4cf5560c;p=linux-2.6 diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 511e4321c6..05710c7c12 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c @@ -18,8 +18,8 @@ #include #include #include +#include #include -#include #include "csr.h" #include "highlevel.h" @@ -520,8 +520,11 @@ static ssize_t fw_show_drv_device_ids(struct device_driver *drv, char *buf) char *scratch = buf; driver = container_of(drv, struct hpsb_protocol_driver, driver); + id = driver->id_table; + if (!id) + return 0; - for (id = driver->id_table; id->match_flags != 0; id++) { + for (; id->match_flags != 0; id++) { int need_coma = 0; if (id->match_flags & IEEE1394_MATCH_VENDOR_ID) { @@ -701,7 +704,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;