Re: [PATCH] android/gatt: Simplify find_device helper

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

 



Hi Marcin,

On Monday 31 of March 2014 11:26:45 Marcin Kraglak wrote:
> We don't need to use dev pointer in second search attempt.
> ---
>  android/gatt.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/android/gatt.c b/android/gatt.c
> index e361506..1bddbcf 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -805,11 +805,7 @@ static struct gatt_device *find_device(bdaddr_t *addr)
>  	if (dev)
>  		return dev;
>  
> -	dev = queue_find(conn_wait_queue, match_dev_by_bdaddr, addr);
> -	if (dev)
> -		return dev;
> -
> -	return NULL;
> +	return queue_find(conn_wait_queue, match_dev_by_bdaddr, addr);
>  }
>  
>  static struct gatt_device *find_device_by_conn_id(int32_t conn_id)
> 

Patch applied, thanks.

-- 
Best regards, 
Szymon Janc
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux