lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFRkauD-S3hxLJLDmpte4cduKL53F=XDrU1pkBER6C1xVyxG=w@mail.gmail.com>
Date:	Tue, 19 Feb 2013 09:58:42 +0800
From:	Axel Lin <axel.lin@...ics.com>
To:	"Kim, Milo" <Milo.Kim@...com>
Cc:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/4] regulator: core: support shared enable GPIO concept

> +                       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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ