Re: [PATCH_v4 3/7] android/pan: shutdown io channel on disconnect call

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

 



Hi Ravi,

On Wed, Dec 18, 2013, Ravi kumar Veeramally wrote:
> Shutdown io channel and send DISCONNECTING notification and send
> DISCONNECTED notification and free the device on callback.
> ---
>  android/pan.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)

I've applied the first two patches, but one thing with this one:

> diff --git a/android/pan.c b/android/pan.c
> index b83f534..f64b09a 100644
> --- a/android/pan.c
> +++ b/android/pan.c
> @@ -269,7 +269,7 @@ static void bt_pan_disconnect(const void *buf, uint16_t len)
>  {
>  	const struct hal_cmd_pan_disconnect *cmd = buf;
>  	struct pan_device *dev;
> -	uint8_t status;
> +	uint8_t status = HAL_STATUS_FAILED;
>  	GSList *l;
>  	bdaddr_t dst;
>  
> @@ -278,20 +278,20 @@ static void bt_pan_disconnect(const void *buf, uint16_t len)
>  	android2bdaddr(&cmd->bdaddr, &dst);
>  
>  	l = g_slist_find_custom(devices, &dst, device_cmp);
> -	if (!l) {
> -		status = HAL_STATUS_FAILED;
> +	if (!l)
>  		goto failed;

Since we in general try to avoid initializations upon declaration I'd
keep the status = HAL_STATUS_FAILED here. Even if it would be ok to move
it it shouldn't be in this patch since it's unrelated.

Johan
--
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