提交 360772f2 编写于 作者: D Dan Carpenter 提交者: Bartlomiej Zolnierkiewicz

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
上级 dd7d958a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册