staging: mt7621-mmc: Fix dereference before check in msdc_drv_pm
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Tue, 24 Apr 2018 18:01:22 +0000 (20:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 13:36:19 +0000 (15:36 +0200)
commitafcc0ca1c854e8fbed59ec61b2535962a1af6571
treedaf9a14276358981efe525b16878840f041023cb
parent7cc6f682ca6f09e4acf9182512ac37cacc51324d
staging: mt7621-mmc: Fix dereference before check in msdc_drv_pm

In the msdc_drv_pm function the variable mmc is dereferenced before
checked. Reordering fixes that.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/sd.c