Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 5 Sep 2009 21:59:00 +0000 (14:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 5 Sep 2009 21:59:00 +0000 (14:59 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: sbp2: fix freeing of unallocated memory
  firewire: ohci: fix Ricoh R5C832, video reception
  firewire: ohci: fix Agere FW643 and multiple cameras
  firewire: core: fix crash in iso resource management

1  2 
drivers/firewire/sbp2.c

diff --combined drivers/firewire/sbp2.c
index 8d51568ee14344ee1e9e4ac11f690ae7a2c1d6a2,05f0c0c55f4a51cfd92aeffd286f30d8a38fb92c..e5df822a8130ca99730a009c75cf3ea454bfccab
@@@ -456,12 -456,12 +456,12 @@@ static void sbp2_status_write(struct fw
        }
        spin_unlock_irqrestore(&card->lock, flags);
  
-       if (&orb->link != &lu->orb_list)
+       if (&orb->link != &lu->orb_list) {
                orb->callback(orb, &status);
-       else
+               kref_put(&orb->kref, free_orb);
+       } else {
                fw_error("status write for unknown orb\n");
-       kref_put(&orb->kref, free_orb);
+       }
  
        fw_send_response(card, request, RCODE_COMPLETE);
  }
@@@ -1142,7 -1142,7 +1142,7 @@@ static int sbp2_probe(struct device *de
                return -ENOMEM;
  
        tgt = (struct sbp2_target *)shost->hostdata;
 -      unit->device.driver_data = tgt;
 +      dev_set_drvdata(&unit->device, tgt);
        tgt->unit = unit;
        kref_init(&tgt->kref);
        INIT_LIST_HEAD(&tgt->lu_list);
  static int sbp2_remove(struct device *dev)
  {
        struct fw_unit *unit = fw_unit(dev);
 -      struct sbp2_target *tgt = unit->device.driver_data;
 +      struct sbp2_target *tgt = dev_get_drvdata(&unit->device);
  
        sbp2_target_put(tgt);
        return 0;
@@@ -1259,7 -1259,7 +1259,7 @@@ static void sbp2_reconnect(struct work_
  
  static void sbp2_update(struct fw_unit *unit)
  {
 -      struct sbp2_target *tgt = unit->device.driver_data;
 +      struct sbp2_target *tgt = dev_get_drvdata(&unit->device);
        struct sbp2_logical_unit *lu;
  
        fw_device_enable_phys_dma(fw_parent_device(unit));