aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm750fb
diff options
context:
space:
mode:
authorMadhumitha Prabakaran <madhumithabiw@gmail.com>2019-03-13 10:32:05 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-18 07:06:05 +0100
commit3732d7016725e45415b99261c81856b944206529 (patch)
tree5070283474efb16e707fd2d5a79a7211ca622983 /drivers/staging/sm750fb
parentstaging: mt7621-mmc: delele extra blank lines (diff)
downloadlinux-dev-3732d7016725e45415b99261c81856b944206529.tar.xz
linux-dev-3732d7016725e45415b99261c81856b944206529.zip
staging: sm750fb: Remove an unnecessary local variable in a function
Remove an unnecessary local variable in sm750_format_pll_reg function and replace its initialization directly in return type. Issue suggested by Coccinelle using ret.cocci. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb')
-rw-r--r--drivers/staging/sm750fb/ddk750_chip.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index 90f5480304f4..93abfa8b0090 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -391,7 +391,6 @@ unsigned int sm750_format_pll_reg(struct pll_value *pPLL)
unsigned int OD = pPLL->OD;
unsigned int M = pPLL->M;
unsigned int N = pPLL->N;
- unsigned int reg = 0;
/*
* Note that all PLL's have the same format. Here, we just use
@@ -399,13 +398,11 @@ unsigned int sm750_format_pll_reg(struct pll_value *pPLL)
* register. On returning a 32 bit number, the value can be
* applied to any PLL in the calling function.
*/
- reg = PLL_CTRL_POWER |
+ return PLL_CTRL_POWER |
#ifndef VALIDATION_CHIP
((POD << PLL_CTRL_POD_SHIFT) & PLL_CTRL_POD_MASK) |
#endif
((OD << PLL_CTRL_OD_SHIFT) & PLL_CTRL_OD_MASK) |
((N << PLL_CTRL_N_SHIFT) & PLL_CTRL_N_MASK) |
((M << PLL_CTRL_M_SHIFT) & PLL_CTRL_M_MASK);
-
- return reg;
}