Re: [PATCH 1/9] Get thermometer service range to load the driver.

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

 



Hi Santiago,

On Thu, Sep 29, 2011, Santiago Carot-Nemesio wrote:
>  static int thermometer_driver_probe(struct btd_device *device, GSList *uuids)
>  {
> -	return thermometer_register(connection, device);
> +	struct att_primary *tattr;
> +	GSList *list;
> +
> +	list = device_services_from_record(device, uuids);
> +	if (!list)
> +		return -1;

Could you try to avoid -1 error values. Please choose some appropriate
POSIX error code instead (e.g. EINVAL in this case). Also (and I know
we're note very consistent with this) when you're testing whether a
pointer is NULL use "pointer == NULL" instead of "!pointer". This makes
is directly clear that this is not a variable of some boolean type.

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