Linux-Samsung-soc Archive on
 help / color / Atom feed
From: Marek Szyprowski <>
Cc: Wolfram Sang <>,
	Bibby Hsieh <>,
	Tomasz Figa <>,
	Bartosz Golaszewski <>,,
	Bartlomiej Zolnierkiewicz <>,
Subject: Re: [PATCH] i2c: core: fix NULL pointer dereference in suspend/resume callbacks
Date: Fri, 22 May 2020 13:15:12 +0200
Message-ID: <> (raw)
In-Reply-To: <>

Hi All,

On 22.05.2020 12:13, Marek Szyprowski wrote:
> Commit 6fe12cdbcfe3 ("i2c: core: support bus regulator controlling in
> adapter") added generic suspend and resume functions for i2c devices.
> Those functions unconditionally access an i2c_client structure assigned
> to the given i2c device. However, there exist i2c devices in the system
> without a valid i2c_client. Add the needed check before accessing the
> i2c_client.

Just one more comment. The devices without i2c_client structure are the 
i2c 'devices' associated with the respective i2c bus. They are visible 
in /sys:

ls -l /sys/bus/i2c/devices/i2c-*

I wonder if this patch has been ever tested with system suspend/resume, 
as those devices are always available in the system...

> ...

Best regards
Marek Szyprowski, PhD
Samsung R&D Institute Poland

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2020-05-22 10:13 ` Marek Szyprowski
2020-05-22 11:15   ` Marek Szyprowski [this message]
2020-05-22 14:20     ` Wolfram Sang
2020-05-25 12:28     ` Tomasz Figa
2020-05-25 12:43       ` Marek Szyprowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Samsung-soc Archive on

Archives are clonable:
	git clone --mirror linux-samsung-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-samsung-soc linux-samsung-soc/ \
	public-inbox-index linux-samsung-soc

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone