mmc: block: check for NULL pointer before dereferencing

mmc block data can be NULL. Hence, check for NULL before
dereferencing md.

CRs-Fixed: 562259
Change-Id: I0182c216ec73347cdd2ea464f593839fffd242a9
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>

adapt to current code block
Makefile: try out link time optimization flags

Change-Id: I6abb9a606e515da69f723fb183bd4d7e38e9dc30