diff options
Diffstat (limited to 'drivers/firewire/core-cdev.c')
-rw-r--r-- | drivers/firewire/core-cdev.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 27ac423ab25e..7ef316fdc4d9 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c | |||
@@ -389,10 +389,8 @@ static void queue_bus_reset_event(struct client *client) | |||
389 | struct bus_reset_event *e; | 389 | struct bus_reset_event *e; |
390 | 390 | ||
391 | e = kzalloc(sizeof(*e), GFP_KERNEL); | 391 | e = kzalloc(sizeof(*e), GFP_KERNEL); |
392 | if (e == NULL) { | 392 | if (e == NULL) |
393 | fw_notice(client->device->card, "out of memory when allocating event\n"); | ||
394 | return; | 393 | return; |
395 | } | ||
396 | 394 | ||
397 | fill_bus_reset_event(&e->reset, client); | 395 | fill_bus_reset_event(&e->reset, client); |
398 | 396 | ||
@@ -693,10 +691,9 @@ static void handle_request(struct fw_card *card, struct fw_request *request, | |||
693 | 691 | ||
694 | r = kmalloc(sizeof(*r), GFP_ATOMIC); | 692 | r = kmalloc(sizeof(*r), GFP_ATOMIC); |
695 | e = kmalloc(sizeof(*e), GFP_ATOMIC); | 693 | e = kmalloc(sizeof(*e), GFP_ATOMIC); |
696 | if (r == NULL || e == NULL) { | 694 | if (r == NULL || e == NULL) |
697 | fw_notice(card, "out of memory when allocating event\n"); | ||
698 | goto failed; | 695 | goto failed; |
699 | } | 696 | |
700 | r->card = card; | 697 | r->card = card; |
701 | r->request = request; | 698 | r->request = request; |
702 | r->data = payload; | 699 | r->data = payload; |
@@ -930,10 +927,9 @@ static void iso_callback(struct fw_iso_context *context, u32 cycle, | |||
930 | struct iso_interrupt_event *e; | 927 | struct iso_interrupt_event *e; |
931 | 928 | ||
932 | e = kmalloc(sizeof(*e) + header_length, GFP_ATOMIC); | 929 | e = kmalloc(sizeof(*e) + header_length, GFP_ATOMIC); |
933 | if (e == NULL) { | 930 | if (e == NULL) |
934 | fw_notice(context->card, "out of memory when allocating event\n"); | ||
935 | return; | 931 | return; |
936 | } | 932 | |
937 | e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT; | 933 | e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT; |
938 | e->interrupt.closure = client->iso_closure; | 934 | e->interrupt.closure = client->iso_closure; |
939 | e->interrupt.cycle = cycle; | 935 | e->interrupt.cycle = cycle; |
@@ -950,10 +946,9 @@ static void iso_mc_callback(struct fw_iso_context *context, | |||
950 | struct iso_interrupt_mc_event *e; | 946 | struct iso_interrupt_mc_event *e; |
951 | 947 | ||
952 | e = kmalloc(sizeof(*e), GFP_ATOMIC); | 948 | e = kmalloc(sizeof(*e), GFP_ATOMIC); |
953 | if (e == NULL) { | 949 | if (e == NULL) |
954 | fw_notice(context->card, "out of memory when allocating event\n"); | ||
955 | return; | 950 | return; |
956 | } | 951 | |
957 | e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL; | 952 | e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL; |
958 | e->interrupt.closure = client->iso_closure; | 953 | e->interrupt.closure = client->iso_closure; |
959 | e->interrupt.completed = fw_iso_buffer_lookup(&client->buffer, | 954 | e->interrupt.completed = fw_iso_buffer_lookup(&client->buffer, |
@@ -1366,8 +1361,7 @@ static int init_iso_resource(struct client *client, | |||
1366 | int ret; | 1361 | int ret; |
1367 | 1362 | ||
1368 | if ((request->channels == 0 && request->bandwidth == 0) || | 1363 | if ((request->channels == 0 && request->bandwidth == 0) || |
1369 | request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL || | 1364 | request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL) |
1370 | request->bandwidth < 0) | ||
1371 | return -EINVAL; | 1365 | return -EINVAL; |
1372 | 1366 | ||
1373 | r = kmalloc(sizeof(*r), GFP_KERNEL); | 1367 | r = kmalloc(sizeof(*r), GFP_KERNEL); |
@@ -1582,10 +1576,9 @@ void fw_cdev_handle_phy_packet(struct fw_card *card, struct fw_packet *p) | |||
1582 | 1576 | ||
1583 | list_for_each_entry(client, &card->phy_receiver_list, phy_receiver_link) { | 1577 | list_for_each_entry(client, &card->phy_receiver_list, phy_receiver_link) { |
1584 | e = kmalloc(sizeof(*e) + 8, GFP_ATOMIC); | 1578 | e = kmalloc(sizeof(*e) + 8, GFP_ATOMIC); |
1585 | if (e == NULL) { | 1579 | if (e == NULL) |
1586 | fw_notice(card, "out of memory when allocating event\n"); | ||
1587 | break; | 1580 | break; |
1588 | } | 1581 | |
1589 | e->phy_packet.closure = client->phy_receiver_closure; | 1582 | e->phy_packet.closure = client->phy_receiver_closure; |
1590 | e->phy_packet.type = FW_CDEV_EVENT_PHY_PACKET_RECEIVED; | 1583 | e->phy_packet.type = FW_CDEV_EVENT_PHY_PACKET_RECEIVED; |
1591 | e->phy_packet.rcode = RCODE_COMPLETE; | 1584 | e->phy_packet.rcode = RCODE_COMPLETE; |