Skip to content

Commit f78089e

Browse files
committed
Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull firewure updates from Stefan Richter: - fix controller removal when controller is in suspended state - fix video reception on VIA VT6306 with gstreamer, MythTV, and maybe dv4l - fix a startup issue with Agere/LSI FW643-e2 - error logging improvements and other small updates * tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: ohci: dump_stack() for PHY regs read/write failures firewire: ohci: Improve bus reset error messages firewire: ohci: Alias dev_* log functions firewire: ohci: Fix 'failed to read phy reg' on FW643 rev8 firewire: ohci: fix VIA VT6306 video reception firewire: ohci: Check LPS before register access on pci removal firewire: ohci: Fix double free_irq() firewire: remove unnecessary alloc/OOM messages firewire: sbp2: replace BUG_ON by WARN_ON firewire: core: remove an always false test firewire: Remove two unneeded checks for macros
2 parents 7462543 + 6fe9efb commit f78089e

5 files changed

Lines changed: 166 additions & 152 deletions

File tree

‎drivers/firewire/core-cdev.c‎

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,8 @@ static void queue_bus_reset_event(struct client *client)
389389
struct bus_reset_event *e;
390390

391391
e = kzalloc(sizeof(*e), GFP_KERNEL);
392-
if (e == NULL) {
393-
fw_notice(client->device->card, "out of memory when allocating event\n");
392+
if (e == NULL)
394393
return;
395-
}
396394

397395
fill_bus_reset_event(&e->reset, client);
398396

@@ -693,10 +691,9 @@ static void handle_request(struct fw_card *card, struct fw_request *request,
693691

694692
r = kmalloc(sizeof(*r), GFP_ATOMIC);
695693
e = kmalloc(sizeof(*e), GFP_ATOMIC);
696-
if (r == NULL || e == NULL) {
697-
fw_notice(card, "out of memory when allocating event\n");
694+
if (r == NULL || e == NULL)
698695
goto failed;
699-
}
696+
700697
r->card = card;
701698
r->request = request;
702699
r->data = payload;
@@ -930,10 +927,9 @@ static void iso_callback(struct fw_iso_context *context, u32 cycle,
930927
struct iso_interrupt_event *e;
931928

932929
e = kmalloc(sizeof(*e) + header_length, GFP_ATOMIC);
933-
if (e == NULL) {
934-
fw_notice(context->card, "out of memory when allocating event\n");
930+
if (e == NULL)
935931
return;
936-
}
932+
937933
e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT;
938934
e->interrupt.closure = client->iso_closure;
939935
e->interrupt.cycle = cycle;
@@ -950,10 +946,9 @@ static void iso_mc_callback(struct fw_iso_context *context,
950946
struct iso_interrupt_mc_event *e;
951947

952948
e = kmalloc(sizeof(*e), GFP_ATOMIC);
953-
if (e == NULL) {
954-
fw_notice(context->card, "out of memory when allocating event\n");
949+
if (e == NULL)
955950
return;
956-
}
951+
957952
e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL;
958953
e->interrupt.closure = client->iso_closure;
959954
e->interrupt.completed = fw_iso_buffer_lookup(&client->buffer,
@@ -1366,8 +1361,7 @@ static int init_iso_resource(struct client *client,
13661361
int ret;
13671362

13681363
if ((request->channels == 0 && request->bandwidth == 0) ||
1369-
request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL ||
1370-
request->bandwidth < 0)
1364+
request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL)
13711365
return -EINVAL;
13721366

13731367
r = kmalloc(sizeof(*r), GFP_KERNEL);
@@ -1582,10 +1576,9 @@ void fw_cdev_handle_phy_packet(struct fw_card *card, struct fw_packet *p)
15821576

15831577
list_for_each_entry(client, &card->phy_receiver_list, phy_receiver_link) {
15841578
e = kmalloc(sizeof(*e) + 8, GFP_ATOMIC);
1585-
if (e == NULL) {
1586-
fw_notice(card, "out of memory when allocating event\n");
1579+
if (e == NULL)
15871580
break;
1588-
}
1581+
15891582
e->phy_packet.closure = client->phy_receiver_closure;
15901583
e->phy_packet.type = FW_CDEV_EVENT_PHY_PACKET_RECEIVED;
15911584
e->phy_packet.rcode = RCODE_COMPLETE;

‎drivers/firewire/core-device.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,8 @@ static void create_units(struct fw_device *device)
692692
* match the drivers id_tables against it.
693693
*/
694694
unit = kzalloc(sizeof(*unit), GFP_KERNEL);
695-
if (unit == NULL) {
696-
fw_err(device->card, "out of memory for unit\n");
695+
if (unit == NULL)
697696
continue;
698-
}
699697

700698
unit->directory = ci.p + value - 1;
701699
unit->device.bus = &fw_bus_type;

‎drivers/firewire/net.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,8 @@ static struct fwnet_fragment_info *fwnet_frag_new(
356356
}
357357

358358
new = kmalloc(sizeof(*new), GFP_ATOMIC);
359-
if (!new) {
360-
dev_err(&pd->skb->dev->dev, "out of memory\n");
359+
if (!new)
361360
return NULL;
362-
}
363361

364362
new->offset = offset;
365363
new->len = len;
@@ -402,8 +400,6 @@ static struct fwnet_partial_datagram *fwnet_pd_new(struct net_device *net,
402400
fail_w_new:
403401
kfree(new);
404402
fail:
405-
dev_err(&net->dev, "out of memory\n");
406-
407403
return NULL;
408404
}
409405

@@ -609,7 +605,6 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len,
609605

610606
skb = dev_alloc_skb(len + LL_RESERVED_SPACE(net));
611607
if (unlikely(!skb)) {
612-
dev_err(&net->dev, "out of memory\n");
613608
net->stats.rx_dropped++;
614609

615610
return -ENOMEM;

0 commit comments

Comments
 (0)