diff options
author | John Stultz <[email protected]> | 2012-04-24 13:43:35 -0700 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2012-04-26 11:17:01 +0200 |
commit | e48b5e825f9c471cbcbfd934a4c2df27e9d39635 (patch) | |
tree | 4c2d4ce64bcd7ee61a2bbc209299f6678549f17a /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | a6371f80230eaaafd7eef7efeedaa9509bdc982d (diff) |
rtc: Fix possible null pointer dereference in rtc-mpc5121.c
Mark Loard pointed out:
"For example, this beauty from rtc-mpc5121.c in the same update:
...
rtc->rtc = rtc_device_register("mpc5200-rtc", &op->dev,
&mpc5200_rtc_ops, THIS_MODULE);
...
rtc->rtc->uie_unsupported = 1; // <<<< Ooops NULL pointer >>>>
if (IS_ERR(rtc->rtc)) { // <<<< this needs to be earlier >>>>
err = PTR_ERR(rtc->rtc);
goto out_free_irq;
}
..."
This patch moves setting the uie_unsupported flag to after we validate
the rtc->rtc pointer to resolve this.
Reported by: Mark Lord <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions