gnss: fixes for char-misc-next
Johan Hovold
maintainercover gnss: fixes for char-misc-next
Hi Greg,
Here's a resend of two gnss fixes for char-misc-next which I noted you haven't picked up directly (I'll continue picking these up an forwarding to you in batches if that's alright).
Thanks,
Johan
Colin Ian King (1):
gnss: ubx: make struct ubx_gserial_ops static
Dan Carpenter (1):
gnss: fix potential error pointer dereference
drivers/gnss/core.c | 4 ++-- drivers/gnss/ubx.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.18.0
Johan Hovold
maintainerPATCH 1/2 gnss: ubx: make struct ubx_gserial_ops static
From: Colin Ian King <[email protected]>
The structure ubx_gserial_ops is local to the source and does not need to be in global scope, so make it static.
Cleans up sparse warning:
symbol 'ubx_gserial_ops' was not declared. Should it be static?
--- drivers/gnss/ubx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gnss/ubx.c +1 -1
@@ -59,7 +59,7 @@ static int ubx_set_power(struct gnss_serial *gserial,return -EINVAL ; } -const struct gnss_serial_ops ubx_gserial_ops = { +static const struct gnss_serial_ops ubx_gserial_ops = { .set_power = ubx_set_power, };
Signature · 1 line
2.18.0
Johan Hovold
maintainerPATCH 2/2 gnss: fix potential error pointer dereference
In reply to Johan HovoldFrom: Dan Carpenter <[email protected]>
The gnss_allocate_device() function returns a mix of NULL and error pointers on error. It should only return one or the other. Since the callers both check for NULL, I've modified it to return NULL on error.
--- drivers/gnss/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gnss/core.c +2 -2
@@ -235,7 +235,7 @@ struct gnss_device *gnss_allocate_device(struct device *parent) id =ida_simple_get (&gnss_minors,0 ,GNSS_MINORS ,GFP_KERNEL );if (id <0 ) {kfree (gdev); -return ERR_PTR (id); +return NULL ; } gdev->id = id;
@@ -270,7 +270,7 @@ struct gnss_device *gnss_allocate_device(struct device *parent) err_put_device:put_device (dev); -return ERR_PTR (-ENOMEM ); +return NULL ; }EXPORT_SYMBOL_GPL (gnss_allocate_device);
Signature · 1 line
2.18.0
Quoted 5 lines · Johan Hovold
Hi Greg,
Here's a resend of two gnss fixes for char-misc-next which I noted you haven't picked up directly (I'll continue picking these up an forwarding to you in batches if that's alright).
That's fine, I didn't see them myself, which is why I didn't pick them up. I'll just wait for you to forward patches on for this subsystem, as that makes things a lot easier for me.
thanks,
greg k-h
Johan Hovold
maintainerQuoted 10 lines · Greg Kroah-Hartman
Quoted 5 lines · Johan Hovold
Hi Greg,
Here's a resend of two gnss fixes for char-misc-next which I noted you haven't picked up directly (I'll continue picking these up an forwarding to you in batches if that's alright).
That's fine, I didn't see them myself, which is why I didn't pick them up. I'll just wait for you to forward patches on for this subsystem, as that makes things a lot easier for me.
Perfect, thanks!
Johan