media: exynos: mfc: don't deref curr_ctx for dev-global irq reasons
Device-global interrupts (sleep/wake/status/init) can happen without
curr_ctx being valid. Specifically, this has happened when a sleep
request (called from s5p_mfc_suspsend()) immediately
follows a context being released. The driver doesn't reset curr_ctx
to an invalid value, so it is possible to have curr_ctx contain a
stale value when the device irqs are processed.
Ideally, the driver should be fixed to understand that curr_ctx
can have an invalid value, but there are a lot of references and
it would take a lot of time to audit them all and figure out which
situations warrant a check and which do not. It would also not be
a trivial and easily testable change.
So, instead, we isolate the irq reasons that do not rely on
current context being valid, and check them separately before
continuing to context-specific irq processing.
Signed-off-by: Dima Zavin <firstname.lastname@example.org>