intel_th: gth: Fix an off-by-one in output unassigning
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 1 Mar 2019 08:09:55 +0000 (10:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2019 07:58:56 +0000 (09:58 +0200)
commitbce00f419c9df589b5b6d403d5229b9ccf7edf12
tree2dbc25bb5519ae1a95bd6d525c40ef9c38fb7b2e
parent9c8c39bae89ab3cd6133d244fa19ee2141aabeac
intel_th: gth: Fix an off-by-one in output unassigning

commit 91d3f8a629849968dc91d6ce54f2d46abf4feb7f upstream.

Commit 9ed3f22223c3 ("intel_th: Don't reference unassigned outputs")
fixes a NULL dereference for all masters except the last one ("256+"),
which keeps the stale pointer after the output driver had been unassigned.

Fix the off-by-one.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Fixes: 9ed3f22223c3 ("intel_th: Don't reference unassigned outputs")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/intel_th/gth.c