staging: gpib: Agilent usb code cleanup
authorDave Penkler <dpenkler@gmail.com>
Sat, 18 Jan 2025 14:50:46 +0000 (15:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Jan 2025 08:06:31 +0000 (09:06 +0100)
commit579b6f18c5ca162af040f44684cc55f7da182236
tree39fdabff5eec3fa21e99689cef0adc0558762616
parent6a6c153537f093c3bc79ea9633f3954d3450d0ba
staging: gpib: Agilent usb code cleanup

Remove useless #ifdef RESET_USB_CONFIG code.

Change kalloc / memset to kzalloc

The attach function was not freeing the private data on error
returns. Separate the releasing of urbs and private data and
add a common error exit for attach failure.

Set the board private data pointer to NULL after freeing
the private data.

Reduce console spam by emitting only one attach message.

Change last pr_err in attach to dev_err

Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Link: https://lore.kernel.org/r/20250118145046.12181-3-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/agilent_82357a/agilent_82357a.c