linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: APD: remove redundant assignment to pointer clk
@ 2019-07-02 13:10 Colin King
  2019-07-05  9:41 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-07-02 13:10 UTC (permalink / raw)
  To: Rafael J . Wysocki, Len Brown, linux-acpi; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The pointer clk is being initialized with a value that is never
read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/acpi/acpi_apd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index ff47317d8ef1..7cd0c9ac71ea 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -57,7 +57,7 @@ struct apd_private_data {
 static int acpi_apd_setup(struct apd_private_data *pdata)
 {
 	const struct apd_device_desc *dev_desc = pdata->dev_desc;
-	struct clk *clk = ERR_PTR(-ENODEV);
+	struct clk *clk;
 
 	if (dev_desc->fixed_clk_rate) {
 		clk = clk_register_fixed_rate(&pdata->adev->dev,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: APD: remove redundant assignment to pointer clk
  2019-07-02 13:10 [PATCH] ACPI: APD: remove redundant assignment to pointer clk Colin King
@ 2019-07-05  9:41 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2019-07-05  9:41 UTC (permalink / raw)
  To: Colin King; +Cc: Len Brown, linux-acpi, kernel-janitors, linux-kernel

On Tuesday, July 2, 2019 3:10:29 PM CEST Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer clk is being initialized with a value that is never
> read and it is being updated later with a new value. The
> initialization is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/acpi/acpi_apd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> index ff47317d8ef1..7cd0c9ac71ea 100644
> --- a/drivers/acpi/acpi_apd.c
> +++ b/drivers/acpi/acpi_apd.c
> @@ -57,7 +57,7 @@ struct apd_private_data {
>  static int acpi_apd_setup(struct apd_private_data *pdata)
>  {
>  	const struct apd_device_desc *dev_desc = pdata->dev_desc;
> -	struct clk *clk = ERR_PTR(-ENODEV);
> +	struct clk *clk;
>  
>  	if (dev_desc->fixed_clk_rate) {
>  		clk = clk_register_fixed_rate(&pdata->adev->dev,
> 

Applied, thanks!





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-05  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 13:10 [PATCH] ACPI: APD: remove redundant assignment to pointer clk Colin King
2019-07-05  9:41 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).