mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 08:44:39 +01:00
ramips: Fix cmpilation
Fixes this compile problem:
```
drivers/net/ethernet/ralink/esw_rt3050.c: In function 'rt3050_esw_init':
drivers/net/ethernet/ralink/esw_rt3050.c:1467:12: error: 'pdev' is used uninitialized [-Werror=uninitialized]
1467 | if (!pdev)
| ^
drivers/net/ethernet/ralink/esw_rt3050.c:1461:33: note: 'pdev' was declared here
1461 | struct platform_device *pdev;
| ^~~~
cc1: all warnings being treated as errors
```
Fixes: 4ffd5aa239 ("treewide: fix coccinelle checks")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
4814636b9b
commit
27e5d7ddd9
1 changed files with 3 additions and 3 deletions
|
|
@ -1464,13 +1464,13 @@ int rt3050_esw_init(struct fe_priv *priv)
|
|||
const __be32 *rgmii;
|
||||
int ret;
|
||||
|
||||
if (!pdev)
|
||||
return -ENODEV;
|
||||
|
||||
if (!of_device_is_compatible(np, ralink_esw_match->compatible))
|
||||
return -EINVAL;
|
||||
|
||||
pdev = of_find_device_by_node(np);
|
||||
if (!pdev)
|
||||
return -ENODEV;
|
||||
|
||||
esw = platform_get_drvdata(pdev);
|
||||
if (!esw) {
|
||||
put_device(&pdev->dev);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue