Re: [PATCH v10 13/15] platform/x86: wmi: create userspace interface for drivers

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

 



On Thu, Oct 19, 2017 at 12:50:16PM -0500, Mario Limonciello wrote:
> +	wblock = container_of(wdev, struct wmi_block, dev);
> +	if (!wblock)
> +		return -ENODEV;

How can container_of() ever return NULL?  If so, you have a very odd
memory layout...

> +	list_for_each_entry_safe(wblock, next, &wmi_block_list, list) {
> +		wdriver = container_of(wblock->dev.dev.driver,
> +					struct wmi_driver, driver);
> +		if (!wdriver)
> +			continue;

Same here.  And other places in this file.

thanks,

greg k-h



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

  Powered by Linux