efi: Add missing mmc and net checks from device_path

The MMC and network subsystems must be present to use device paths for
them. Add the missing checks.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-02 16:26:34 +01:00
parent 1ecf365eab
commit 0f97a71491

View File

@@ -62,8 +62,12 @@ const struct efi_device_path EFI_DP_END = {
*/
static bool is_sd(struct blk_desc *desc)
{
struct mmc *mmc = find_mmc_device(desc->devnum);
struct mmc *mmc;
if (!IS_ENABLED(CONFIG_MMC))
return false;
mmc = find_mmc_device(desc->devnum);
if (!mmc)
return false;
@@ -949,7 +953,7 @@ struct efi_device_path *efi_dp_from_http(const char *server, struct udevice *dev
strlcat(tmp, server, sizeof(tmp));
#if !IS_ENABLED(CONFIG_NET_LWIP)
}
else {
else if (IS_ENABLED(CONFIG_NET)) {
ip_to_string(net_server_ip, tmp + strlen("http://"));
#endif
}