diff options
| author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-08-10 16:04:03 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-04 16:29:28 +0200 |
| commit | 8e152448d0a099b71d64d3e52fcfc8175fbd123b (patch) | |
| tree | 0ac94b570eecec8a3575cb3c84d70a269f39c91d /drivers/firewire/core-cdev.c | |
| parent | 390de4d01bc14ade9354b53a5720d78aef93d3c4 (diff) | |
| download | linux-8e152448d0a099b71d64d3e52fcfc8175fbd123b.tar.gz linux-8e152448d0a099b71d64d3e52fcfc8175fbd123b.tar.bz2 linux-8e152448d0a099b71d64d3e52fcfc8175fbd123b.zip | |
firewire: core: correct range of block for case of switch statement
[ Upstream commit ebb9d3ca8f7efc1b6a2f1750d1058eda444883d0 ]
A commit d8527cab6c31 ("firewire: cdev: implement new event to notify
response subaction with time stamp") adds an additional case,
FW_CDEV_EVENT_RESPONSE2, into switch statement in complete_transaction().
However, the range of block is beyond to the case label and reaches
neibour default label.
This commit corrects the range of block. Fortunately, it has few impacts
in practice since the local variable in the scope under the label is not
used in codes under default label.
Fixes: d8527cab6c31 ("firewire: cdev: implement new event to notify response subaction with time stamp")
Link: https://lore.kernel.org/r/20240810070403.36801-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/firewire/core-cdev.c')
| -rw-r--r-- | drivers/firewire/core-cdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 6274b86eb943..73cc2f2dcbf9 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -598,11 +598,11 @@ static void complete_transaction(struct fw_card *card, int rcode, u32 request_ts queue_event(client, &e->event, rsp, sizeof(*rsp) + rsp->length, NULL, 0); break; + } default: WARN_ON(1); break; } - } /* Drop the idr's reference */ client_put(client); |
