diff mbox series

nvmem: lpc18xx_eeprom: fix compile warning

Message ID 20181005070313.GA2217@embeddedor.com (mailing list archive)
State New, archived
Headers show
Series nvmem: lpc18xx_eeprom: fix compile warning | expand

Commit Message

Gustavo A. R. Silva Oct. 5, 2018, 7:03 a.m. UTC
Fix the following warning by removing unused variable ret:

drivers/nvmem/lpc18xx_eeprom.c: In function ‘lpc18xx_eeprom_remove’:
drivers/nvmem/lpc18xx_eeprom.c:258:6: warning: unused variable ‘ret’
[-Wunused-variable]
  int ret;
      ^~~

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/nvmem/lpc18xx_eeprom.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Srinivas Kandagatla Oct. 5, 2018, 8:06 a.m. UTC | #1
On 05/10/18 08:03, Gustavo A. R. Silva wrote:
> Fix the following warning by removing unused variable ret:
> 
> drivers/nvmem/lpc18xx_eeprom.c: In function ‘lpc18xx_eeprom_remove’:
> drivers/nvmem/lpc18xx_eeprom.c:258:6: warning: unused variable ‘ret’
> [-Wunused-variable]
>    int ret;
>        ^~~
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

There is already a patch submitted fix this

  https://lore.kernel.org/patchwork/patch/995032/


-srini

> ---
>   drivers/nvmem/lpc18xx_eeprom.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/nvmem/lpc18xx_eeprom.c b/drivers/nvmem/lpc18xx_eeprom.c
> index b42dbad..66cff1e 100644
> --- a/drivers/nvmem/lpc18xx_eeprom.c
> +++ b/drivers/nvmem/lpc18xx_eeprom.c
> @@ -255,7 +255,6 @@ static int lpc18xx_eeprom_probe(struct platform_device *pdev)
>   static int lpc18xx_eeprom_remove(struct platform_device *pdev)
>   {
>   	struct lpc18xx_eeprom_dev *eeprom = platform_get_drvdata(pdev);
> -	int ret;
>   
>   	clk_disable_unprepare(eeprom->clk);
>   
>
Gustavo A. R. Silva Oct. 5, 2018, 8:12 a.m. UTC | #2
On 10/5/18 10:06 AM, Srinivas Kandagatla wrote:
> 
> 
> On 05/10/18 08:03, Gustavo A. R. Silva wrote:
>> Fix the following warning by removing unused variable ret:
>>
>> drivers/nvmem/lpc18xx_eeprom.c: In function ‘lpc18xx_eeprom_remove’:
>> drivers/nvmem/lpc18xx_eeprom.c:258:6: warning: unused variable ‘ret’
>> [-Wunused-variable]
>>    int ret;
>>        ^~~
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> 
> There is already a patch submitted fix this
> 
>  https://lore.kernel.org/patchwork/patch/995032/
> 

Oh, good to know.

Thanks, Srini.
--
Gustavo
diff mbox series

Patch

diff --git a/drivers/nvmem/lpc18xx_eeprom.c b/drivers/nvmem/lpc18xx_eeprom.c
index b42dbad..66cff1e 100644
--- a/drivers/nvmem/lpc18xx_eeprom.c
+++ b/drivers/nvmem/lpc18xx_eeprom.c
@@ -255,7 +255,6 @@  static int lpc18xx_eeprom_probe(struct platform_device *pdev)
 static int lpc18xx_eeprom_remove(struct platform_device *pdev)
 {
 	struct lpc18xx_eeprom_dev *eeprom = platform_get_drvdata(pdev);
-	int ret;
 
 	clk_disable_unprepare(eeprom->clk);