There are two occurrances where objects are being free'd via
a put call and yet they are being referenced after this. Fix these
by adding in the missing continue statement so that the put on the
end of the loop is skipped over.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Addresses-Coverity: ("Use after free")
Fixes: 11e8f5fd223b ("drm: Add simpledrm driver")
Link: https://patchwork.freedesktop.org/patch/msgid/20210512203051.299026-1-colin.king@canonical.com
drm_err(dev, "failed to enable clock %u: %d\n",
i, ret);
clk_put(clock);
+ continue;
}
sdev->clks[i] = clock;
}
drm_err(dev, "failed to enable regulator %u: %d\n",
i, ret);
regulator_put(regulator);
+ continue;
}
sdev->regulators[i++] = regulator;