diff options
-rw-r--r-- | drivers/mmc/core/host.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 6a7475ad7685..096093f7be00 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -599,12 +599,12 @@ struct mmc_host *devm_mmc_alloc_host(struct device *dev, int extra) dr = devres_alloc(devm_mmc_host_release, sizeof(*dr), GFP_KERNEL); if (!dr) - return ERR_PTR(-ENOMEM); + return NULL; host = mmc_alloc_host(extra, dev); - if (IS_ERR(host)) { + if (!host) { devres_free(dr); - return host; + return NULL; } *dr = host; |