summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-07-04 17:47:23 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2017-07-04 17:47:23 +0200
commit360772f26407b759ec3a91dda81fdbc74b7f7f2c (patch)
tree1c5ef14643e73bcdf205cac535c9db4b570aef5b /drivers/video
parentdd7d958ae9126b2d4a96e41340579049afebd2bf (diff)
video: fbdev: matrox: the list iterator can't be NULL
My static checker is complaining because we check "drv" for NULL and then we dereference it to get the next item in the list. It can't be NULL so we can remove this check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/matrox/matroxfb_base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c
index 11eb094396ae..f6a0b9af97a9 100644
--- a/drivers/video/fbdev/matrox/matroxfb_base.c
+++ b/drivers/video/fbdev/matrox/matroxfb_base.c
@@ -2001,7 +2001,7 @@ static void matroxfb_register_device(struct matrox_fb_info* minfo) {
for (drv = matroxfb_driver_l(matroxfb_driver_list.next);
drv != matroxfb_driver_l(&matroxfb_driver_list);
drv = matroxfb_driver_l(drv->node.next)) {
- if (drv && drv->probe) {
+ if (drv->probe) {
void *p = drv->probe(minfo);
if (p) {
minfo->drivers_data[i] = p;