Attention is currently required from: Edward O'Callaghan.
1 comment:
File board_enable.c:
Patch Set #3, Line 1097: dev = pcidev_clonedev(dev);
NB. does the code here make sense to anyone? It looks like it's
cloning the `dev` just to leak the memory? Maybe this part was
written before the pci_dev_find_vendorclass() above?
Never mind, I figured it out, looking at the signature of
pci_get_dev() the last parameter is the function number. So
what happens here is that we match one device by vendor and
class, and depending on its ID maybe fetch the second function
under the same mult-function device. So basically another
device. Despite the leaking, the code seems to make sense.
Moving the `1` into a function with a generic name, not so
much :-/
To view, visit change 59276. To unsubscribe, or for help writing mail filters, visit settings.