From: David Kershner Date: Tue, 28 Mar 2017 13:34:50 +0000 (-0400) Subject: staging: unisys: visorbus: check for err from dev_set_name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0d210ae5fddfdc9a657ea5a21de9d54f8315336;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: unisys: visorbus: check for err from dev_set_name The function dev_set_name can return an error, don't just ignore it. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index ce897a2a4b79..f5b637ccf1cd 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -642,8 +642,10 @@ create_visor_device(struct visor_device *dev) * (NOT bus instance). That's why we need to include the bus * number within the name. */ - dev_set_name(&dev->device, "vbus%u:dev%u", - chipset_bus_no, chipset_dev_no); + err = dev_set_name(&dev->device, "vbus%u:dev%u", + chipset_bus_no, chipset_dev_no); + if (err) + goto err_put; /* * device_add does this: