summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/Kconfig
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-08-09 22:10:27 +0530
committerLee Jones <lee.jones@linaro.org>2014-09-26 08:15:36 +0100
commite0c8a1f52d0d3dc5f79ce04d7bf6da0782dcee16 (patch)
tree3ef61a9b36a9a26c05bb824a272ddc5c7a79093e /drivers/mfd/Kconfig
parent7821d9b24bf73eee7a4e3e3744f05c6eee88db48 (diff)
downloadlinux-e0c8a1f52d0d3dc5f79ce04d7bf6da0782dcee16.tar.bz2
mfd: menelaus: Remove null pointer dereference
If vtg is NULL, it is not possible to access its mode_reg field. At all sites where the static function menelaus_set_voltage is called, the first argument is the address of a structure defined in the file. So, the null test is unnecessary and is removed. Also, a label is done away with. This problem was found using the following Coccinelle semantic match: // <smpl> @@ expression E, E1; identifier f; statement S1,S2,S3; @@ * if (E == NULL) { ... when != if (E == NULL) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/Kconfig')
0 files changed, 0 insertions, 0 deletions