mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
fsl/fman: Remove some useless code
There is no need to release explicitly some devm_ allocated resources. If the 'mac_probe()' probe function fails, they will be released automatically, as already done in the other error handling paths of this function. Also goto '_return_of_get_parent' as in the other error handling paths. This is useless (priv->fixed_link is NULL at this point), but at least it is consistent. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5adb55c929
commit
336eac4347
1 changed files with 2 additions and 5 deletions
|
|
@ -709,11 +709,8 @@ static int mac_probe(struct platform_device *_of_dev)
|
|||
}
|
||||
|
||||
if (!of_device_is_available(mac_node)) {
|
||||
devm_iounmap(dev, priv->vaddr);
|
||||
__devm_release_region(dev, fman_get_mem_region(priv->fman),
|
||||
res.start, res.end + 1 - res.start);
|
||||
devm_kfree(dev, mac_dev);
|
||||
return -ENODEV;
|
||||
err = -ENODEV;
|
||||
goto _return_of_get_parent;
|
||||
}
|
||||
|
||||
/* Get the cell-index */
|
||||
|
|
|
|||
Loading…
Reference in a new issue