[PATCH] 8139too: Remove unnecessary netif_napi_del()

2018-05-24 Thread Bo Chen
The call to free_netdev() in __rtl8139_cleanup_dev() clears the network device napi list, and explicit calls to netif_napi_del() are unnecessary. Signed-off-by: Bo Chen --- drivers/net/ethernet/realtek/8139too.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/realtek

[PATCH] ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream()

2018-05-31 Thread Bo Chen
is patch fixes the bug by calling 'snd_device_free()' in the error handling path of 'kzalloc()', which removes the new pcm instance from the snd card before returns with an error code. Signed-off-by: Bo Chen --- sound/pci/hda/hda_controller.c | 4 +++- 1 file changed, 3 ins

[PATCH] e1000: check the return of pci_get_drvdata() in e1000_remove()

2018-05-22 Thread Bo Chen
This check on pci_get_drvdata() prevents potential invalid pointer dereferences, and is a common practice in *_remove() functions from other drivers, such as 'intel/e100.c', 'amd/pcnet32.c', 'realtek/8139too.c', and 'broadcom/tg3.c'. Signed-off-by: Bo Che

Re: [PATCH] e1000: check the return of pci_get_drvdata() in e1000_remove()

2018-05-22 Thread Bo Chen
rong to assume 'dev_get_drvdata()' can return NULL and inject faults from it. Do you have any suggestions about how I can avoid such wrong assumptions? Thanks again for your time and attention. I hope this patch is not wasting too much effort from the netdev community. Any other comments or

[PATCH] pcnet32: add an error handling path in pcnet32_probe_pci()

2018-05-21 Thread Bo Chen
Make sure to invoke pci_disable_device() when errors occur in pcnet32_probe_pci(). Signed-off-by: Bo Chen --- drivers/net/ethernet/amd/pcnet32.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32