diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /drivers/firewire/net.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'drivers/firewire/net.c')
| -rw-r--r-- | drivers/firewire/net.c | 21 | 
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index af22be84034b..538bd677c254 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -706,21 +706,22 @@ static void fwnet_receive_packet(struct fw_card *card, struct fw_request *r,  	int rcode;  	if (destination == IEEE1394_ALL_NODES) { -		kfree(r); - -		return; -	} - -	if (offset != dev->handler.offset) +		// Although the response to the broadcast packet is not necessarily required, the +		// fw_send_response() function should still be called to maintain the reference +		// counting of the object. In the case, the call of function just releases the +		// object as a result to decrease the reference counting. +		rcode = RCODE_COMPLETE; +	} else if (offset != dev->handler.offset) {  		rcode = RCODE_ADDRESS_ERROR; -	else if (tcode != TCODE_WRITE_BLOCK_REQUEST) +	} else if (tcode != TCODE_WRITE_BLOCK_REQUEST) {  		rcode = RCODE_TYPE_ERROR; -	else if (fwnet_incoming_packet(dev, payload, length, -				       source, generation, false) != 0) { +	} else if (fwnet_incoming_packet(dev, payload, length, +					 source, generation, false) != 0) {  		dev_err(&dev->netdev->dev, "incoming packet failure\n");  		rcode = RCODE_CONFLICT_ERROR; -	} else +	} else {  		rcode = RCODE_COMPLETE; +	}  	fw_send_response(card, r, rcode);  }  |