Skip to content
Commit ebfe2797 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Greg Kroah-Hartman
Browse files

scsi: myrb: Fix up null pointer access on myrb_cleanup()

[ Upstream commit f9f0a461

 ]

When myrb_probe() fails the callback might not be set, so we need to
validate the 'disable_intr' callback in myrb_cleanup() to not cause a null
pointer exception. And while at it do not call myrb_cleanup() if we cannot
enable the PCI device at all.

Link: https://lore.kernel.org/r/20220523120244.99515-1-hare@suse.de
Reported-by: default avatarZheyu Ma <zheyuma97@gmail.com>
Tested-by: default avatarZheyu Ma <zheyuma97@gmail.com>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7eb32f28
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment