usb: cdns3: gadget: unsigned int is dereferenced as a wider unsigned long
It is reported by Coverity scan, and fixed it by declare the reg as unsigned long. Reviewed-by: Jun Li <jun.li@nxp.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Acked-by: Roger Quadros <rogerq@ti.com> Link: https://lore.kernel.org/r/20200623031001.8469-3-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8a58264128
commit
8685c46d39
@ -1810,7 +1810,7 @@ static irqreturn_t cdns3_device_thread_irq_handler(int irq, void *data)
|
||||
irqreturn_t ret = IRQ_NONE;
|
||||
unsigned long flags;
|
||||
int bit;
|
||||
u32 reg;
|
||||
unsigned long reg;
|
||||
|
||||
spin_lock_irqsave(&priv_dev->lock, flags);
|
||||
|
||||
@ -1841,7 +1841,7 @@ static irqreturn_t cdns3_device_thread_irq_handler(int irq, void *data)
|
||||
if (!reg)
|
||||
goto irqend;
|
||||
|
||||
for_each_set_bit(bit, (unsigned long *)®,
|
||||
for_each_set_bit(bit, ®,
|
||||
sizeof(u32) * BITS_PER_BYTE) {
|
||||
cdns3_check_ep_interrupt_proceed(priv_dev->eps[bit]);
|
||||
ret = IRQ_HANDLED;
|
||||
|
Loading…
x
Reference in New Issue
Block a user