Re: [PATCH 1/3] Drivers: hv: vmbus: do cleanup on all vmbus_open() failure paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux