Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755878AbbDULt2 (ORCPT ); Tue, 21 Apr 2015 07:49:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41670 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754638AbbDULtZ (ORCPT ); Tue, 21 Apr 2015 07:49:25 -0400 From: Vitaly Kuznetsov To: Dan Carpenter Cc: "K. Y. Srinivasan" , devel@linuxdriverproject.org, Haiyang Zhang , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] Drivers: hv: vmbus: do cleanup on all vmbus_open() failure paths References: <1429604274-12537-1-git-send-email-vkuznets@redhat.com> <1429604274-12537-2-git-send-email-vkuznets@redhat.com> <20150421090508.GB14154@mwanda> Date: Tue, 21 Apr 2015 13:36:56 +0200 In-Reply-To: <20150421090508.GB14154@mwanda> (Dan Carpenter's message of "Tue, 21 Apr 2015 12:05:08 +0300") Message-ID: <87lhhlbtlz.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 30 Dan Carpenter writes: > On Tue, Apr 21, 2015 at 10:17:52AM +0200, Vitaly Kuznetsov wrote: >> diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c >> index 54da66d..836386f 100644 >> --- a/drivers/hv/channel.c >> +++ b/drivers/hv/channel.c >> @@ -186,11 +186,12 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, >> list_del(&open_info->msglistentry); >> spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags); >> >> - if (err == 0) >> - newchannel->state = CHANNEL_OPENED_STATE; >> + if (err != 0) > > Doesn't the double negative not make it slightly more confusing? > Point taken, will fix in v2 :-) > regards, > dan carpenter -- Vitaly -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/