* [PATCH] staging: greybus: bundle.c fix comparison to NULL
@ 2019-03-04 17:06 Dominik Adamski
2019-03-17 11:36 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Adamski @ 2019-03-04 17:06 UTC (permalink / raw)
Cc: adamski.dominik, Johan Hovold, Alex Elder, Greg Kroah-Hartman,
greybus-dev, devel, linux-kernel
Fix checkpatch issue:
Comparison to NULL could be written "!bundle->state"
Signed-off-by: Dominik Adamski <adamski.dominik@gmail.com>
---
drivers/staging/greybus/bundle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
index e97b2b87ba47..3f702db9e098 100644
--- a/drivers/staging/greybus/bundle.c
+++ b/drivers/staging/greybus/bundle.c
@@ -32,7 +32,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
{
struct gb_bundle *bundle = to_gb_bundle(dev);
- if (bundle->state == NULL)
+ if (!bundle->state)
return sprintf(buf, "\n");
return sprintf(buf, "%s\n", bundle->state);
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: greybus: bundle.c fix comparison to NULL
2019-03-04 17:06 [PATCH] staging: greybus: bundle.c fix comparison to NULL Dominik Adamski
@ 2019-03-17 11:36 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2019-03-17 11:36 UTC (permalink / raw)
To: Dominik Adamski
Cc: devel, Alex Elder, Johan Hovold, linux-kernel, greybus-dev
On Mon, Mar 04, 2019 at 06:06:36PM +0100, Dominik Adamski wrote:
> Fix checkpatch issue:
> Comparison to NULL could be written "!bundle->state"
>
> Signed-off-by: Dominik Adamski <adamski.dominik@gmail.com>
> ---
> drivers/staging/greybus/bundle.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
> index e97b2b87ba47..3f702db9e098 100644
> --- a/drivers/staging/greybus/bundle.c
> +++ b/drivers/staging/greybus/bundle.c
> @@ -32,7 +32,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
> {
> struct gb_bundle *bundle = to_gb_bundle(dev);
>
> - if (bundle->state == NULL)
> + if (!bundle->state)
> return sprintf(buf, "\n");
>
> return sprintf(buf, "%s\n", bundle->state);
This does not apply to my tree, please rebase and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-17 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 17:06 [PATCH] staging: greybus: bundle.c fix comparison to NULL Dominik Adamski
2019-03-17 11:36 ` Greg Kroah-Hartman
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.