On Wed, Apr 13, 2016 at 01:19:13AM +0100, André Przywara wrote:
> >> + /* If we don't have a .self clk use the first output-name up to
> >> '_' */
> >> + if (factors.name == NULL) {
> >> + char *endp;
> >> +
> >> + of_property_read_string_index(node, "clock-output-names",
> >> + 0, &clk_name);
> >> + endp = strchr(clk_name, '_');
> >> + if (endp) {
> >> + derived_name = kstrndup(clk_name, endp - clk_name,
> >> + GFP_KERNEL);
> >> + factors.name = derived_name;
> >> + } else {
> >> + factors.name = clk_name;
> >
> > I wonder when we'd run into this case.
>
> Well, with the current DTs we wouldn't, but I rather have this line in
> here than provoking a kernel NULL pointer dereference if someone happens
> to name the first clock without an underscore in it.
>
> Maxime, are you happy with this patch for 4.7?
> Shall I rebase and repost?Not really, but I don't have the choice either. Applied. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Digital signature
