aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-04-14 16:23:43 +0100
committerWei Liu <wei.liu@kernel.org>2020-05-20 09:13:58 +0000
commit677b0ce5d66c5445440f3cedd3c20ff1665c0f46 (patch)
tree240671376ef4ef4b3fb0fcbc6836e76c2fc83279 /drivers/hv
parentscsi: storvsc: Re-init stor_chns when a channel interrupt is re-assigned (diff)
downloadlinux-dev-677b0ce5d66c5445440f3cedd3c20ff1665c0f46.tar.xz
linux-dev-677b0ce5d66c5445440f3cedd3c20ff1665c0f46.zip
drivers: hv: remove redundant assignment to pointer primary_channel
The pointer primary_channel is being assigned with a value that is never used. The assignment is redundant and can be removed. Move the definition of primary_channel to a narrower scope. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200414152343.243166-1-colin.king@canonical.com [ wei: move primary_channel and update commit message ] Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/channel_mgmt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index ffd7fffa5f83..fde806d6525b 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -400,7 +400,6 @@ static void vmbus_release_relid(u32 relid)
void hv_process_channel_removal(struct vmbus_channel *channel)
{
- struct vmbus_channel *primary_channel;
unsigned long flags;
lockdep_assert_held(&vmbus_connection.channel_mutex);
@@ -425,10 +424,8 @@ void hv_process_channel_removal(struct vmbus_channel *channel)
if (channel->primary_channel == NULL) {
list_del(&channel->listentry);
-
- primary_channel = channel;
} else {
- primary_channel = channel->primary_channel;
+ struct vmbus_channel *primary_channel = channel->primary_channel;
spin_lock_irqsave(&primary_channel->lock, flags);
list_del(&channel->sc_list);
spin_unlock_irqrestore(&primary_channel->lock, flags);