aboutsummaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorMaxime Ripard <[email protected]>2016-10-19 15:33:04 +0200
committerUlf Hansson <[email protected]>2016-11-29 09:00:31 +0100
commit424feb59d87828a7569174becc17f9b0905a304f (patch)
treea096aa5f2b22b7b1d37ebc4b829fb8d4c4103528 /net/switchdev/switchdev.c
parent417b1bf8367edb7e68bd9f3275c104871aeca530 (diff)
mmc: sunxi: Prevent against null dereference for vmmc
VMMC is an optional regulator, which means that mmc_regulator_get_supply will only return an error in case of a deferred probe, but not when the regulator is not set in the DT. However, the sunxi driver assumes that VMMC is always there, and doesn't check the value of the regulator pointer before using it, which obviously leads to a (close to) null pointer dereference. Add proper checks to prevent that. Signed-off-by: Maxime Ripard <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions