Re: [PATCH] PM / Domains: check for negative return from of_count_phandle_with_args

From: Pavel Machek
Date: Wed Oct 26 2016 - 07:00:19 EST


On Tue 2016-10-25 11:14:40, Kevin Hilman wrote:
> Colin King <colin.king@xxxxxxxxxxxxx> writes:
>
> > From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> >
> > The return from of_count_phandle_with_args can be negative, so we
> > should avoid kcalloc of a negative count of genpd_power_stat structs
> > by sanity checking if count is zero or less.
> >
> > Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> Acked-by: Kevin Hilman <khilman@xxxxxxxxxxxx>

Acked-by: Pavel Machek <pavel@xxxxxx>

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature