lkml.org 
[lkml]   [2017]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 11/14] sata: ahci-da850: un-hardcode the MPY bits
From
Date
On Monday 30 January 2017 03:32 PM, Bartosz Golaszewski wrote:

> + /*
> + * The second clock used by ahci-da850 is the external REFCLK. If we
> + * didn't get it from ahci_platform_get_resources(), let's try to
> + * specify the con_id in clk_get().
> + */
> + if (!hpriv->clks[1]) {
> + clk = clk_get(dev, "refclk");
> + if (IS_ERR(clk)) {
> + dev_err(dev, "unable to obtain the reference clock");
> + return -ENODEV;
> + } else {
> + hpriv->clks[1] = clk;
> + }

This results in a checkpatch warning about the unneeded else. I fixed
this locally to look like:

+ */
+ if (!hpriv->clks[1]) {
+ clk = clk_get(dev, "refclk");
+ if (IS_ERR(clk)) {
+ dev_err(dev, "unable to obtain the reference clock");
+ return -ENODEV;
+ }
+
+ hpriv->clks[1] = clk;
+ }

Thanks,
Sekhar

\
 
 \ /
  Last update: 2017-01-31 16:15    [W:0.282 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site