usb: pci-quirks: Reduce the length of a spinlock section in usb_amd_find_chipset_info()

'info' is local to the function. There is no need to zeroing it within
a spin_lock section. Moreover, there is no need to explicitly initialize
the .need_pll_quirk field.

Initialize the structure when defined and remove the now useless memset().

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/08ee42fced6af6bd56892cd14f2464380ab071fa.1679600396.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christophe JAILLET 2023-03-23 20:40:22 +01:00 committed by Greg Kroah-Hartman
parent df9ba6a245
commit c03ff66dc0
1 changed files with 1 additions and 3 deletions

View File

@ -207,8 +207,7 @@ EXPORT_SYMBOL_GPL(sb800_prefetch);
static void usb_amd_find_chipset_info(void) static void usb_amd_find_chipset_info(void)
{ {
unsigned long flags; unsigned long flags;
struct amd_chipset_info info; struct amd_chipset_info info = { };
info.need_pll_quirk = false;
spin_lock_irqsave(&amd_lock, flags); spin_lock_irqsave(&amd_lock, flags);
@ -218,7 +217,6 @@ static void usb_amd_find_chipset_info(void)
spin_unlock_irqrestore(&amd_lock, flags); spin_unlock_irqrestore(&amd_lock, flags);
return; return;
} }
memset(&info, 0, sizeof(info));
spin_unlock_irqrestore(&amd_lock, flags); spin_unlock_irqrestore(&amd_lock, flags);
if (!amd_chipset_sb_type_init(&info)) { if (!amd_chipset_sb_type_init(&info)) {