Fri, Sep 06, 2024 at 09:52:34AM +0200, Thomas Zimmermann kirjoitti: > Store the lcd device in struct fb_info.lcd_dev. The lcd subsystem can > now detect the lcd's fbdev device from this field. > > This makes the implementation of check_fb in clps711x_lcd_ops obsolete. > Remove it. ... > + lcd = devm_lcd_device_register(dev, "clps711x-lcd", dev, cfb, > + &clps711x_lcd_ops); > + if (IS_ERR(lcd)) { > + ret = PTR_ERR(lcd); > + goto out_fb_dealloc_cmap; > + } > + > + info->lcd_dev = lcd; > + > ret = register_framebuffer(info); > if (ret) > goto out_fb_dealloc_cmap; > > - lcd = devm_lcd_device_register(dev, "clps711x-lcd", dev, cfb, > - &clps711x_lcd_ops); > - if (!IS_ERR(lcd)) > - return 0; > + return 0; > > - ret = PTR_ERR(lcd); > unregister_framebuffer(info); Haven't you got a dead code warning here? > > out_fb_dealloc_cmap: -- With Best Regards, Andy Shevchenko