efi: load the protocol expected by the driver
The drivers are loaded if any guid provided by the device matches. So load
the protocol for the matched guid and not for the first guid.
Otherwise the driver may cast the protocol to the wrong type and proably
crash.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 441e9f5 commit 3e1af511f06021e138132f227a1746f44bbe8e31
@Michael Olbrich Michael Olbrich authored on 11 Mar 2017
Sascha Hauer committed on 30 Mar 2017
Showing 1 changed file
View
drivers/efi/efi-device.c