mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
memory: brcmstb_dpfe: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Markus Mayer <mmayer@broadcom.com> Link: https://lore.kernel.org/r/20200828153747.22358-1-krzk@kernel.org
This commit is contained in:
parent
4c2af5ddf8
commit
74ca0d837b
@ -901,11 +901,8 @@ static int brcmstb_dpfe_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = brcmstb_dpfe_download_firmware(priv);
|
ret = brcmstb_dpfe_download_firmware(priv);
|
||||||
if (ret) {
|
if (ret)
|
||||||
if (ret != -EPROBE_DEFER)
|
return dev_err_probe(dev, ret, "Couldn't download firmware\n");
|
||||||
dev_err(dev, "Couldn't download firmware -- %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = sysfs_create_groups(&pdev->dev.kobj, priv->dpfe_api->sysfs_attrs);
|
ret = sysfs_create_groups(&pdev->dev.kobj, priv->dpfe_api->sysfs_attrs);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user