RE: [PATCH] video: fbdev: fsl: fix kernel crash when diu_ops is not implemented

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Timur,

Thanks for your review.

>  On Tue, Nov 24, 2015 at 1:27 AM, Dongsheng Wang
> <dongsheng.wang@xxxxxxxxxxxxx> wrote:
> > @@ -1697,6 +1700,9 @@ static int fsl_diu_probe(struct platform_device *pdev)
> >         unsigned int i;
> >         int ret;
> >
> > +       if (!diu_ops.set_pixel_clock)
> > +               return -ENODEV;
> > +
> >         data = dmam_alloc_coherent(&pdev->dev, sizeof(struct fsl_diu_data),
> >                                    &dma_addr, GFP_DMA | __GFP_ZERO);
> >         if (!data)
> 
> This doesn't make any sense.  If set_pixel_clock() is not defined,
> then the whole driver aborts the probe.  When could that ever happen?
> If the platform code does not exist, then don't let the driver be
> probed.

Another patch video: fbdev: fsl: Split DIU initialization entry:[https://patchwork.kernel.org/patch/7381351/]
module_init(fsl_diu_init) will be replace, and all of the initialization will be completed in the probe
include this check. So just do a quick fix for this boot kernel crash issue.

Regards,
-Dongsheng
��.n��������+%������w��{.n�����{����n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux