summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-29 10:42:38 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-29 10:42:38 +0200
commitfb6d8d12edea49bfa5c769be4f04c43570a1d197 (patch)
treef1b9e13c5c0f98d13e61cabda27eeb9013e32b1a
parentd4014a6b46a52a999cd8e06958d207c8fb9504b6 (diff)
parent9b5816b56af6a424619ab51d24de34dfc65102d8 (diff)
Merge tag 'gnss-5.8-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss into char-misc-next
Johan writes: GNSS updates for 5.8-rc1 Here are the GNSS updates for 5.8-rc1, including: - a fix for two broken probe errors paths in the sirf driver - a flexible array conversion Both have been in linux-next with no reported issues. * tag 'gnss-5.8-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss: gnss: replace zero-length array with flexible-array gnss: sirf: fix error return code in sirf_probe()
-rw-r--r--drivers/gnss/serial.h2
-rw-r--r--drivers/gnss/sirf.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gnss/serial.h b/drivers/gnss/serial.h
index 980ffdc86c2a..621953f7821d 100644
--- a/drivers/gnss/serial.h
+++ b/drivers/gnss/serial.h
@@ -16,7 +16,7 @@ struct gnss_serial {
struct gnss_device *gdev;
speed_t speed;
const struct gnss_serial_ops *ops;
- unsigned long drvdata[0];
+ unsigned long drvdata[];
};
enum gnss_serial_pm_state {
diff --git a/drivers/gnss/sirf.c b/drivers/gnss/sirf.c
index effed3a8d398..2ecb1d3e8eeb 100644
--- a/drivers/gnss/sirf.c
+++ b/drivers/gnss/sirf.c
@@ -439,14 +439,18 @@ static int sirf_probe(struct serdev_device *serdev)
data->on_off = devm_gpiod_get_optional(dev, "sirf,onoff",
GPIOD_OUT_LOW);
- if (IS_ERR(data->on_off))
+ if (IS_ERR(data->on_off)) {
+ ret = PTR_ERR(data->on_off);
goto err_put_device;
+ }
if (data->on_off) {
data->wakeup = devm_gpiod_get_optional(dev, "sirf,wakeup",
GPIOD_IN);
- if (IS_ERR(data->wakeup))
+ if (IS_ERR(data->wakeup)) {
+ ret = PTR_ERR(data->wakeup);
goto err_put_device;
+ }
ret = regulator_enable(data->vcc);
if (ret)