aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sti/sti_hqvdp.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-05-05 15:33:19 +0200
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>2017-05-09 14:46:19 +0200
commitda98d2e13b9566ddc1e84e418ab6a86155138d9b (patch)
tree47bb90701038d79354e29b29076d861039f15c9c /drivers/gpu/drm/sti/sti_hqvdp.c
parentdrm/sti: Fix typos in a comment line (diff)
downloadlinux-dev-da98d2e13b9566ddc1e84e418ab6a86155138d9b.tar.xz
linux-dev-da98d2e13b9566ddc1e84e418ab6a86155138d9b.zip
drm/sti: Adjust two checks for null pointers in sti_hqvdp_probe()
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus fix the affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: http://patchwork.freedesktop.org/patch/msgid/918229e6-80fe-629f-8fec-bf60ac15275f@users.sourceforge.net
Diffstat (limited to 'drivers/gpu/drm/sti/sti_hqvdp.c')
-rw-r--r--drivers/gpu/drm/sti/sti_hqvdp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index 372ea294da80..a1c161f77804 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -1356,12 +1356,12 @@ static int sti_hqvdp_probe(struct platform_device *pdev)
/* Get Memory resources */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (res == NULL) {
+ if (!res) {
DRM_ERROR("Get memory resource failed\n");
return -ENXIO;
}
hqvdp->regs = devm_ioremap(dev, res->start, resource_size(res));
- if (hqvdp->regs == NULL) {
+ if (!hqvdp->regs) {
DRM_ERROR("Register mapping failed\n");
return -ENXIO;
}