]> git.baikalelectronics.ru Git - kernel.git/commit
staging: mt7621-mmc: Fix ret.cooci warnings
authorBhanusree Pola <bhanusreemahesh@gmail.com>
Sun, 17 Mar 2019 11:01:33 +0000 (16:31 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2019 06:47:53 +0000 (07:47 +0100)
commitd98632cd8b9d58b7e1c1ecc04113b14014607f8c
tree8667bb71090a8ad278249a0f176060d0795b9b82
parent120f26182e51d1f52442aa6669faf38d99b492a0
staging: mt7621-mmc: Fix ret.cooci warnings

Return the value directly instead of storing it in local variable err.
Remove the unused local variable err.
The semantic patch that fixes the first part of the problem is as follows

// <smpl>
@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;
// </smpl>

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/sd.c