lkml.org 
[lkml]   [2015]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] clk: shmobile: r8a7779: check return of of_property_read_string_index()
Date

Hi Geert

> > diff --git a/drivers/clk/shmobile/clk-r8a7779.c b/drivers/clk/shmobile/clk-r8a7779.c
> > index 652ecac..af439b2 100644
> > --- a/drivers/clk/shmobile/clk-r8a7779.c
> > +++ b/drivers/clk/shmobile/clk-r8a7779.c
> > @@ -155,8 +155,10 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
> > const char *name;
> > struct clk *clk;
> >
> > - of_property_read_string_index(np, "clock-output-names", i,
> > - &name);
> > + if (of_property_read_string_index(np, "clock-output-names", i,
> > + &name))
> > + pr_err("%s: can't get clock-output-names (%d)\n",
> > + __func__, i);
>
> Shouldn't you add a "continue;" here, too?
>
> Anyway, I don't think this can fail, as
> i < of_property_count_strings(np, "clock-output-names");

Hmm.. indeed.
Thank you for your review, please drop this patch.

Best regards
---
Kuninori Morimoto


\
 
 \ /
  Last update: 2015-04-02 02:41    [W:0.059 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site