lkml.org 
[lkml]   [2012]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[18/20] hwmon: (sht15) fix bad error code
    2.6.32-longterm review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

    commit 6edf3c30af01854c416f8654d3d5d2652470afd4 upstream.

    When no platform data was supplied, returned error code was 0.

    Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
    Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/hwmon/sht15.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/drivers/hwmon/sht15.c
    +++ b/drivers/hwmon/sht15.c
    @@ -515,7 +515,7 @@ static int sht15_invalidate_voltage(stru

    static int __devinit sht15_probe(struct platform_device *pdev)
    {
    - int ret = 0;
    + int ret;
    struct sht15_data *data = kzalloc(sizeof(*data), GFP_KERNEL);

    if (!data) {
    @@ -532,6 +532,7 @@ static int __devinit sht15_probe(struct
    init_waitqueue_head(&data->wait_queue);

    if (pdev->dev.platform_data == NULL) {
    + ret = -EINVAL;
    dev_err(&pdev->dev, "no platform data supplied");
    goto err_free_data;
    }



    \
     
     \ /
      Last update: 2012-02-01 22:57    [W:0.020 / U:37.236 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site