]> asedeno.scripts.mit.edu Git - linux.git/commit
MIPS: SGI-IP27: Fix use of unchecked pointer in shutdown_bridge_irq
authorThomas Bogendoerfer <tbogendoerfer@suse.de>
Thu, 28 Mar 2019 13:37:45 +0000 (14:37 +0100)
committerPaul Burton <paul.burton@mips.com>
Thu, 28 Mar 2019 18:37:41 +0000 (11:37 -0700)
commite4952b0c2c0309bdbfc4c6cc0dd81e37450d74d0
tree2a77ea229e3eef59f764f9b3403615ecdc7603d5
parentab8a6d821179ab9bea1a9179f535ccba6330c1ed
MIPS: SGI-IP27: Fix use of unchecked pointer in shutdown_bridge_irq

smatch complaint:

    arch/mips/sgi-ip27/ip27-irq.c:123 shutdown_bridge_irq()
    warn: variable dereferenced before check 'hd' (see line 121)

Fix it by removing local variable and use hd->pin directly.

Fixes: 69a07a41d908 ("MIPS: SGI-IP27: rework HUB interrupts")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
arch/mips/sgi-ip27/ip27-irq.c