Re: [PATCH v2 09/10] battery: Add support for notifications

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

 



Hi Chen,

On Thu, Sep 13, 2012 at 9:03 AM,  <chen.ganir@xxxxxx> wrote:
>  static void battery_free(gpointer user_data)
>  {
>         struct battery *batt = user_data;
> @@ -99,6 +109,14 @@ static void battery_free(gpointer user_data)
>         if (batt->attrib != NULL)
>                 g_attrib_unref(batt->attrib);
>
> +       if (batt->attrib != NULL) {

You are still repeating the if (batt->attrib != NULL) check here like
Joao mentioned (see above). Instead, you should merge the "if
(batt->attnotid)" block into the existing "if (batt->attrib != NULL)"
block.

> +               if (batt->attnotid) {
> +                       g_attrib_unregister(batt->attrib, batt->attnotid);
> +                       batt->attnotid = 0;
> +               }
> +
> +               g_attrib_unref(batt->attrib);
> +       }
>         btd_device_unref(batt->dev);
>         g_free(batt->svc_range);
>         g_free(batt);

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
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