mac80211: brcmfmac: return -ENFILE if interface exists

This makes brcmfmac compatible with mac80211 which uses dev_alloc_name
(and so returns -ENFILE on error).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
This commit is contained in:
Rafał Miłecki 2016-05-30 08:18:41 +02:00
parent efcaa046b7
commit cdff540623

View file

@ -42,7 +42,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+ dev = dev_get_by_name(&init_net, name);
+ if (dev) {
+ dev_put(dev);
+ return ERR_PTR(-EEXIST);
+ return ERR_PTR(-ENFILE);
+ }
+
brcmf_dbg(TRACE, "enter: %s type %d\n", name, type);