Re: [PATCH v2 4/6] Bluetooth: HCI request error handling

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

 



Hi Andre,

On Thu, Mar 07, 2013, Andre Guedes wrote:
> +	if (req->err) {
> +		skb_queue_purge(&req->cmd_q);
> +		return req->err;
> +	}

Don't we usually use if (err < 0) instead of if (err) for error checks?

>  	skb = hci_prepare_cmd(hdev, opcode, plen, param);
>  	if (!skb) {
>  		BT_ERR("%s no memory for command", hdev->name);
> +		req->err = -ENOMEM;
>  		return -ENOMEM;
>  	}

I think it'd be good to add at least the opcode to the BT_ERR log above
since otherwise the information of exactly which command in the request
caused an error is lost.

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