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]
Date:   Thu, 23 Nov 2023 18:36:10 +0100
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Frieder Schrempf <frieder@...s.de>, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org, Matthias Kaehlcke <mka@...omium.org>,
        Frieder Schrempf <frieder.schrempf@...tron.de>,
        Anand Moon <linux.amoon@...il.com>,
        Benjamin Bara <benjamin.bara@...data.com>,
        Icenowy Zheng <uwu@...nowy.me>, Rob Herring <robh@...nel.org>
Subject: Re: [PATCH 1/2] usb: misc: onboard_usb_hub: Add support for clock
 input

Hello,

On Thu, Nov 23, 2023 at 01:55:57PM +0000, Greg Kroah-Hartman wrote:
> On Thu, Nov 23, 2023 at 02:47:20PM +0100, Frieder Schrempf wrote:
> > +	err = clk_prepare_enable(hub->clk);
> > +	if (err) {
> > +		dev_err(hub->dev, "failed to enable clock: %d\n", err);
> > +		return err;

I suggest to use %pe (and ERR_PTR(err)) here.

> > +	}
> 
> But what happens if clk is not set here?

clk_prepare_enable() just does "return 0" if the clk argument is NULL.

> And doesn't clk_prepare_enable() print out a message if it fails?

clk_prepare_enable is silent on errors.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ