]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ACPI / LPSS: Remove redundant initialization of clk
authorColin Ian King <colin.king@canonical.com>
Sun, 15 Oct 2017 11:50:34 +0000 (12:50 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 8 Nov 2017 23:43:30 +0000 (00:43 +0100)
The pointer clk is being initialized to ERR_PTR(-ENODEV) however
this value is never read before it is set to clk_data->clk. Thus
the initialization is redundant and can be mored.

Cleans up clang warning:
Value stored to 'clk' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_lpss.c

index 032ae44710e5d877770ce746f2412393f2171189..6633bc8e58462dc999c82af6f7b5f9b22f8c8235 100644 (file)
@@ -362,7 +362,7 @@ static int register_device_clock(struct acpi_device *adev,
 {
        const struct lpss_device_desc *dev_desc = pdata->dev_desc;
        const char *devname = dev_name(&adev->dev);
-       struct clk *clk = ERR_PTR(-ENODEV);
+       struct clk *clk;
        struct lpss_clk_data *clk_data;
        const char *parent, *clk_name;
        void __iomem *prv_base;