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] [day] [month] [year] [list]
Message-ID: <CAHp75VfienOzF0NVqS9+YDVSwqCB27E16SWKLy3_Yf4b5Ggbmw@mail.gmail.com>
Date:   Mon, 9 Dec 2019 19:55:03 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Chuhong Yuan <hslester96@...il.com>
Cc:     Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...ux.intel.com>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Bruce Beare <bruce.j.beare@...el.com>,
        Sheng Yang <sheng@...ux.intel.com>,
        Yunhong Jiang <yunhong.jiang@...el.com>,
        Alan Cox <alan@...ux.intel.com>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/platform/goldfish: add a check for platform_device_register_simple

On Mon, Dec 9, 2019 at 6:22 PM Chuhong Yuan <hslester96@...il.com> wrote:
>
> goldfish_init() misses a check for platform_device_register_simple().
> Add a check to fix it.

Thanks for a patch. My comments below.

>  static int __init goldfish_init(void)
>  {
> +       struct platform_device *pdev;
> +
>         if (!goldfish_enable)
>                 return -ENODEV;
>
> -       platform_device_register_simple("goldfish_pdev_bus", -1,
> -                                       goldfish_pdev_bus_resources, 2);

> +       pdev =  platform_device_register_simple("goldfish_pdev_bus", -1,

Perhaps idea for a separate patch or maybe here:
-1 -> PLATFORM_DEVID_NONE

> +                                       goldfish_pdev_bus_resources, 2);

> +       if (IS_ERR(pdev))
> +               return PTR_ERR(pdev);
> +
>         return 0;

This can use PTR_ERR_OR_ZERO() macro instead.

>  }


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ