X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=drivers%2Fxen%2Fxenbus%2Fxenbus_client.c;h=ca744102b6663fb92f37da6f9bc4974fac393d53;hb=fcc3a5d277571bc6048e7b4ef8cd391b935de629;hp=439c9dca9eeedea8c490a9e57174c6745cae8637;hpb=08eb9a8c8a01e7bd689aeb05e51ac945f0adaf61;p=cascardo%2Flinux.git diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c index 439c9dca9eee..ca744102b666 100644 --- a/drivers/xen/xenbus/xenbus_client.c +++ b/drivers/xen/xenbus/xenbus_client.c @@ -259,7 +259,6 @@ static char *error_path(struct xenbus_device *dev) static void xenbus_va_dev_error(struct xenbus_device *dev, int err, const char *fmt, va_list ap) { - int ret; unsigned int len; char *printf_buffer = NULL; char *path_buffer = NULL; @@ -270,9 +269,7 @@ static void xenbus_va_dev_error(struct xenbus_device *dev, int err, goto fail; len = sprintf(printf_buffer, "%i ", -err); - ret = vsnprintf(printf_buffer+len, PRINTF_BUFFER_SIZE-len, fmt, ap); - - BUG_ON(len + ret > PRINTF_BUFFER_SIZE-1); + vsnprintf(printf_buffer+len, PRINTF_BUFFER_SIZE-len, fmt, ap); dev_err(&dev->dev, "%s\n", printf_buffer); @@ -361,8 +358,8 @@ static void xenbus_switch_fatal(struct xenbus_device *dev, int depth, int err, * @ring_mfn: mfn of ring to grant * Grant access to the given @ring_mfn to the peer of the given device. Return - * 0 on success, or -errno on error. On error, the device will switch to - * XenbusStateClosing, and the error will be saved in the store. + * a grant reference on success, or -errno on error. On error, the device will + * switch to XenbusStateClosing, and the error will be saved in the store. */ int xenbus_grant_ring(struct xenbus_device *dev, unsigned long ring_mfn) {