lkml.org 
[lkml]   [2013]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 1/4] regulator: core: support shared enable GPIO concept
From
> +                       if (pin->request_count <= 1) {
> + pin->request_count = 0;
> + gpio_free(pin->gpio);
> + list_del(&pin->list);
> + kfree(pin);
> + } else {
> + pin->request_count--;
> + }

How about change above lines to this:

if (--pin->request_count == 0) {
gpio_free(pin->gpio);
list_del(&pin->list);
kfree(pin);
}


\
 
 \ /
  Last update: 2013-02-19 03:41    [W:0.056 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site