Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e62416e8 authored by Bjørn Mork's avatar Bjørn Mork Committed by David S. Miller
Browse files

net: cdc_mbim: fixup error return value

parent c37ac9b2
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -369,15 +369,13 @@ error:


static int cdc_mbim_suspend(struct usb_interface *intf, pm_message_t message)
static int cdc_mbim_suspend(struct usb_interface *intf, pm_message_t message)
{
{
	int ret = 0;
	int ret = -ENODEV;
	struct usbnet *dev = usb_get_intfdata(intf);
	struct usbnet *dev = usb_get_intfdata(intf);
	struct cdc_mbim_state *info = (void *)&dev->data;
	struct cdc_mbim_state *info = (void *)&dev->data;
	struct cdc_ncm_ctx *ctx = info->ctx;
	struct cdc_ncm_ctx *ctx = info->ctx;


	if (ctx == NULL) {
	if (!ctx)
		ret = -1;
		goto error;
		goto error;
	}


	/*
	/*
	 * Both usbnet_suspend() and subdriver->suspend() MUST return 0
	 * Both usbnet_suspend() and subdriver->suspend() MUST return 0