[parisc-linux] Re: zalon/ncr53c720 crashes K460 (parisc port) on bootup.

Christoph Hellwig hch@infradead.org
Sat, 27 Sep 2003 19:43:19 +0100


On Sat, Sep 27, 2003 at 07:37:56PM +0100, Matthew Wilcox wrote:
> -       struct host_data *host_data = (struct host_data *)host->hostdata;
> +       struct host_data *host_data;
>  #ifdef DEBUG_NCR53C8XX
>         printk("ncr53c8xx: release\n");
>  #endif
> -       if (host_data->ncb)
> +       if (!host)
> +               return 1;
> +       host_data = (struct host_data *)host->hostdata;
> +       if (host_data && host_data->ncb)
>                 ncr_detach(host_data->ncb);
>         return 1;
>  }
> 
> and it does fix the problem.  Maybe it's too much checking, but I'm not
> interested in tracking down bugs like this again ;-)

Or better just stop calling ncr53c8xx_release if ncr_attach failed..