* [PATCH] i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe
@ 2019-08-20 15:34 Wolfram Sang
2019-09-03 17:52 ` Wolfram Sang
2019-09-04 21:12 ` Wolfram Sang
0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2019-08-20 15:34 UTC (permalink / raw)
To: linux-i2c; +Cc: Wolfram Sang, Hans de Goede, linux-kernel
No need to check the argument of i2c_unregister_device() because the
function itself does it.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Build tested only, buildbot is happy, too.
Please apply to your tree.
drivers/i2c/busses/i2c-cht-wc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
index 66af44bfa67d..3e2608a65c06 100644
--- a/drivers/i2c/busses/i2c-cht-wc.c
+++ b/drivers/i2c/busses/i2c-cht-wc.c
@@ -363,8 +363,7 @@ static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
{
struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev);
- if (adap->client)
- i2c_unregister_device(adap->client);
+ i2c_unregister_device(adap->client);
i2c_del_adapter(&adap->adapter);
irq_domain_remove(adap->irq_domain);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe
2019-08-20 15:34 [PATCH] i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
@ 2019-09-03 17:52 ` Wolfram Sang
2019-09-04 8:26 ` Hans de Goede
2019-09-04 21:12 ` Wolfram Sang
1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2019-09-03 17:52 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, Hans de Goede, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]
On Tue, Aug 20, 2019 at 05:34:40PM +0200, Wolfram Sang wrote:
> No need to check the argument of i2c_unregister_device() because the
> function itself does it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
Hans, are you OK with this change?
> Build tested only, buildbot is happy, too.
>
> Please apply to your tree.
>
> drivers/i2c/busses/i2c-cht-wc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
> index 66af44bfa67d..3e2608a65c06 100644
> --- a/drivers/i2c/busses/i2c-cht-wc.c
> +++ b/drivers/i2c/busses/i2c-cht-wc.c
> @@ -363,8 +363,7 @@ static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
> {
> struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev);
>
> - if (adap->client)
> - i2c_unregister_device(adap->client);
> + i2c_unregister_device(adap->client);
> i2c_del_adapter(&adap->adapter);
> irq_domain_remove(adap->irq_domain);
>
> --
> 2.20.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe
2019-09-03 17:52 ` Wolfram Sang
@ 2019-09-04 8:26 ` Hans de Goede
0 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2019-09-04 8:26 UTC (permalink / raw)
To: Wolfram Sang, Wolfram Sang; +Cc: linux-i2c, linux-kernel
Hi,
On 03-09-19 19:52, Wolfram Sang wrote:
> On Tue, Aug 20, 2019 at 05:34:40PM +0200, Wolfram Sang wrote:
>> No need to check the argument of i2c_unregister_device() because the
>> function itself does it.
>>
>> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>> ---
>
> Hans, are you OK with this change?
Yes this is fine by me:
Acked-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
>
>> Build tested only, buildbot is happy, too.
>>
>> Please apply to your tree.
>>
>> drivers/i2c/busses/i2c-cht-wc.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
>> index 66af44bfa67d..3e2608a65c06 100644
>> --- a/drivers/i2c/busses/i2c-cht-wc.c
>> +++ b/drivers/i2c/busses/i2c-cht-wc.c
>> @@ -363,8 +363,7 @@ static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
>> {
>> struct cht_wc_i2c_adap *adap = platform_get_drvdata(pdev);
>>
>> - if (adap->client)
>> - i2c_unregister_device(adap->client);
>> + i2c_unregister_device(adap->client);
>> i2c_del_adapter(&adap->adapter);
>> irq_domain_remove(adap->irq_domain);
>>
>> --
>> 2.20.1
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe
2019-08-20 15:34 [PATCH] i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
2019-09-03 17:52 ` Wolfram Sang
@ 2019-09-04 21:12 ` Wolfram Sang
1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2019-09-04 21:12 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, Hans de Goede, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 267 bytes --]
On Tue, Aug 20, 2019 at 05:34:40PM +0200, Wolfram Sang wrote:
> No need to check the argument of i2c_unregister_device() because the
> function itself does it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-04 21:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 15:34 [PATCH] i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
2019-09-03 17:52 ` Wolfram Sang
2019-09-04 8:26 ` Hans de Goede
2019-09-04 21:12 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.